scroll Panel

scroll Panel

Postby Silvio.Falconi » Sat Mar 10, 2018 8:55 am

TScrollPanel can run also on Horizontal scroll ?

On tablet I wish scroll products in horizontal

Image



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
 
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7033
Joined: Thu Oct 18, 2012 7:17 pm

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 44 guests