Bug in TScrollBar

Bug in TScrollBar

Postby Enrico Maria Giordano » Sun Sep 24, 2006 2: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.

Code: Select all  Expand view
#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
User avatar
Enrico Maria Giordano
 
Posts: 8355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby Antonio Linares » Sun Sep 24, 2006 9:21 pm

Enrico,

This code looks equivalent and seems to work ok:
Code: Select all  Expand view
    @ 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
User avatar
Antonio Linares
Site Admin
 
Posts: 41356
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Antonio Linares » Sun Sep 24, 2006 9: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
User avatar
Antonio Linares
Site Admin
 
Posts: 41356
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Enrico Maria Giordano » Mon Sep 25, 2006 6:29 am

Exactly.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 29 guests