FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour test sample
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
test sample
Posted: Tue Aug 05, 2008 02:23 PM

Anyone have A test sample of a dialog
with many buttons and vscroll at the right to scroll they ?

thanks

Best Regards, Saludos



Falconi Silvio
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Re: test sample
Posted: Tue Aug 05, 2008 03:08 PM
This is a very basic sample:

#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


EMG
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
test sample
Posted: Tue Aug 05, 2008 03:26 PM

thank I 'm trying it
I must implement it on my old class
remember of tmiadialog ?

Best Regards, Saludos



Falconi Silvio

Continue the discussion