On tablet I wish scroll products in horizontal
How I can modify this test ?
thanks
- Code: Select all Expand view
- Function test()
Local oDlg,oFld
Local oFontTablet
// variabili per la dialog
Local nBottom := 13
Local nRight := 78
Local nWidth := Max( nRight * DLG_CHARPIX_W, 180 )
Local nHeight := nBottom * DLG_CHARPIX_H
Local oScrPanel
DEFINE FONT oFontTablet NAME "TAHOMA" SIZE 0,-25
DEFINE DIALOG oDlg SIZE nWidth, nHeight;
TITLE "Selezione prodotti";
STYLE nOr( DS_MODALFRAME, WS_POPUP, WS_CAPTION, 4 )
oScrPanel := TScrollPanel():New( 1, 1, 50, oDlg:nRight-100, oDlg )
ACTIVATE DIALOG oDlg ;
ON INIT Show_Record(oScrPanel,oFontTablet)
return nil
//--------------------------------------------------------------------
Function Show_Record(oScrPanel,oFontTablet)
LOCAL nRow:= 10
Local nCol:= 10
Local n:= 1
local nTipo:=0
local abtn
USE TIPO ALIAS TIPO
TIPO->(DbGoTop())
abtn:= array(tipo->(RecCount()))
DO WHILE .not. TIPO->(EOF())
@ nRow,nCol RBBTN abtn[n] BITMAP ".\bitmaps\normale.png";
SIZE 100,120 OF oScrPanel PIXEL PROMPT Right(tipo->desc,1);
ACTION ( abtn[n]:lSelected:=.t. ,nTipo:= n) FONT oFontTablet
TIPO->(DBSKIP())
n++
nCol+=120
ENDDO