Anyone have A test sample of a dialog
with many buttons and vscroll at the right to scroll they ?
thanks
#include "Fivewin.ch"
FUNCTION MAIN()
LOCAL oDlg
LOCAL cVar := SPACE( 30 )
DEFINE DIALOG oDlg;
SIZE 800, 600
@ 0, 0 GET cVar
@ 3, 0 BUTTON "&Close";
ACTION oDlg:End()
oDlg:nStyle = NOR( oDlg:nStyle, WS_VSCROLL )
ACTIVATE DIALOG oDlg;
ON INIT IMPOSTASCROLL( oDlg );
CENTER
RETURN NIL
STATIC FUNCTION IMPOSTASCROLL( oDlg )
oDlg:oVScroll:SetRange( 1, 10 )
oDlg:oVScroll:nPgStep = 1
oDlg:oVScroll:bGoUp = { || SpostaControlli( oDlg, 30 ) }
oDlg:oVScroll:bGoDown = { || SpostaControlli( oDlg, -30 ) }
oDlg:oVScroll:bPageUp = { || SpostaControlli( oDlg, 30 ) }
oDlg:oVScroll:bPageDown = { || SpostaControlli( oDlg, -30 ) }
RETURN NIL
STATIC FUNCTION SPOSTACONTROLLI( oDlg, nStep )
LOCAL i
FOR i = 1 TO LEN( oDlg:aControls )
oDlg:aControls[ i ]:Move( oDlg:aControls[ i ]:nTop + nStep, oDlg:aControls[ i ]:nLeft )
NEXT
oDlg:Refresh()
RETURN NIL
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 70 guests