FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Bug in TScrollBar
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Bug in TScrollBar
Posted: Sun Sep 24, 2006 02:01 PM
This is a sample of the problem. Please drag the scrollbar thumb to the middle of the scrollbar itself. Then look at the number in the DIALOG title (it is the scrollbar position). Then click below the thumb to step one page down and look at the number again. It is unchanged while it should be +10. If you click again then the number is increased.

#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oDlg, oScr

    DEFINE DIALOG oDlg

    oScr = TScrollBar():New( 0, 0, 0, 255, 10, .T., oDlg, 10, 50,;
                             { || oDlg:cTitle := LTrim( Str( oScr:GetPos() ) ) },;
                             { || oDlg:cTitle := LTrim( Str( oScr:GetPos() ) ) },;
                             { || oDlg:cTitle := LTrim( Str( oScr:GetPos() ) ) },;
                             { || oDlg:cTitle := LTrim( Str( oScr:GetPos() ) ) } )

    oScr:bTrack = { | nPos | oScr:SetPos( nPos ),;
                             oDlg:cTitle := LTrim( Str( oScr:GetPos() ) ) }

    ACTIVATE DIALOG oDlg;
             CENTER

    RETURN NIL


EMG
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Bug in TScrollBar
Posted: Sun Sep 24, 2006 09:21 PM
Enrico,

This code looks equivalent and seems to work ok:
    @ 0, 0 SCROLLBAR oScr ;
       VERTICAL ;
       RANGE 0, 255 ;
       PAGESTEP 10 ;
       SIZE 10, 50 ;
       ON UP oDlg:cTitle := LTrim( Str( oScr:GetPos() ) ) ;
       ON DOWN oDlg:cTitle := LTrim( Str( oScr:GetPos() ) ) ; 
       ON PAGEUP oDlg:cTitle := LTrim( Str( oScr:GetPos() ) ) ;
       ON PAGEDOWN oDlg:cTitle := LTrim( Str( oScr:GetPos() ) ) ;
       ON THUMBPOS ( oScr:SetPos( nPos ), oDlg:cTitle := LTrim( Str( 

oScr:GetPos() ) ) )
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Bug in TScrollBar
Posted: Sun Sep 24, 2006 09:23 PM

Enrico,

Do you mean that the first pagedown click after the drag & drop, does not respond ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM

Continue the discussion