TWBrowse scrollbar bug

TWBrowse scrollbar bug

Postby Enrico Maria Giordano » Thu Feb 23, 2006 10:10 am

In the following sample, try to hit down arrow key (on the keyboard) many times till to move the highlight to the last record and then hit down arrow key one more time. Now hit up arrow key and you will see that the scrollbar thumb doesn't move up (it will move when you hit up arrow key again):

Code: Select all  Expand view
#include "Fivewin.ch"


REQUEST DBFCDX


FUNCTION MAIN()

    LOCAL oDlg, oBrw

    RDDSETDEFAULT( "DBFCDX" )

    USE TEST

    INDEX ON FIELD -> last + FIELD -> first TO "TEMP__" FOR FIELD -> last = "A"

    DEFINE DIALOG oDlg;
           SIZE 400, 400

    @ 1, 1 LISTBOX oBrw FIELDS TEST -> last,;
                               TEST -> first;
           SIZE 200, 200 PIXEL

    oBrw:bLogicLen = { || ( oBrw:cAlias ) -> ( OrdKeyCount() ) }

    ACTIVATE DIALOG oDlg;
             CENTER

    CLOSE

    FERASE( "TEMP__.CDX" )

    RETURN NIL


A possible fix:

Code: Select all  Expand view
METHOD VGoDown()       INLINE iif( ::nVScrollPos < ::nLen, ::VSetPos( ::nVScrollPos + 1 ), )
METHOD VGoUp()         INLINE iif( ::nVScrollPos > 1, ::VSetPos( ::nVScrollPos - 1 ), )


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

Postby dpaterso » Thu Feb 23, 2006 11:52 am

Are you aware that this also happens when you do the same at the top of the browse i.e. go to the top and do the same thing with the arrow key (or click on the scroll bar up arrow) and the same thing happens?

Regards,

Dale.
dpaterso
 
Posts: 142
Joined: Tue Jan 24, 2006 9:45 am
Location: South Africa

Postby Enrico Maria Giordano » Thu Feb 23, 2006 12:29 pm

Yes. That's why I fixed both methods VGoDown() and VGoUp().

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

Postby dpaterso » Thu Feb 23, 2006 1:55 pm

Sorry, I did not see that.

But you have no idea how grateful I am!!!

Now what about being able to make the lines and headings higher / wider AND GETTING IT INCORPORATED INTO THE NEXT RELEASE OF FWH? :)

And let us not forget about the WIN32 HEADERS!!! :)

Thanks,

Dale.
dpaterso
 
Posts: 142
Joined: Tue Jan 24, 2006 9:45 am
Location: South Africa

Postby dpaterso » Thu Feb 23, 2006 2:02 pm

I can't thank you enough!!!

Regards,

Dale.
dpaterso
 
Posts: 142
Joined: Tue Jan 24, 2006 9:45 am
Location: South Africa

Postby Enrico Maria Giordano » Thu Feb 23, 2006 2:04 pm

In wbrowse.prg there is a single call to DrawHeader() function. Try to play with it.

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

Postby E. Bartzokas » Thu Feb 23, 2006 7:15 pm

EnricoMaria wrote:In wbrowse.prg there is a single call to DrawHeader() function. Try to play with it.

EMG


Enrico hi,
Any idea how I can add lines (horizontal separator lines, as in TWBROWSE() from record to record when browseing a single dimensional array ?

Regards
Evans
User avatar
E. Bartzokas
 
Posts: 114
Joined: Tue Feb 14, 2006 8:13 am
Location: Corinth, Greece

Postby Enrico Maria Giordano » Thu Feb 23, 2006 8:22 pm

Have you tried oBrw:nLineStyle?

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

Postby E. Bartzokas » Thu Feb 23, 2006 9:31 pm

EnricoMaria wrote:Have you tried oBrw:nLineStyle?

EMG

Thanks, I'll try it and will let you know!

Kind regards
Evans
User avatar
E. Bartzokas
 
Posts: 114
Joined: Tue Feb 14, 2006 8:13 am
Location: Corinth, Greece

Postby E. Bartzokas » Thu Feb 23, 2006 10:02 pm

EnricoMaria wrote:Have you tried oBrw:nLineStyle?

EMG


Itried oLbx:nLineStyle := LINES_GRAY

and here is the error...

Error description: Error BASE/1005 Message not found:
TLISTBOX:_NLINESTYLE

Stack Calls
===========
Called from: => TLISTBOX:ERROR(175)
Called from: tobject.prg => (b)HBOBJECT:HBOBJECT(105)
Called from: => TLISTBOX:MSGNOTFOUND(0)
Called from: => TLISTBOX:_NLINESTYLE(167)
User avatar
E. Bartzokas
 
Posts: 114
Joined: Tue Feb 14, 2006 8:13 am
Location: Corinth, Greece

Postby Enrico Maria Giordano » Thu Feb 23, 2006 10:07 pm

E. Bartzokas wrote:Error description: Error BASE/1005 Message not found: TLISTBOX:_NLINESTYLE


nLineStyle is an instance variable of TWBrowse not of TListBox.

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

Postby E. Bartzokas » Fri Feb 24, 2006 4:21 pm

EnricoMaria wrote:
E. Bartzokas wrote:Error description: Error BASE/1005 Message not found: TLISTBOX:_NLINESTYLE


nLineStyle is an instance variable of TWBrowse not of TListBox.

EMG

Correct.
I am using TLISTBOX, and asked if I can make a listbox have horizontal line separators between items, as we have it in TWBROWSE...
I didn't find any method in TLISTBOX to guide me towards this problem, and therefore I ask for your opinion and a piece of your knowledge.
;-)
User avatar
E. Bartzokas
 
Posts: 114
Joined: Tue Feb 14, 2006 8:13 am
Location: Corinth, Greece

Postby Enrico Maria Giordano » Fri Feb 24, 2006 4:59 pm

No, you can't, as far as I know.

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

Postby Antonio Linares » Sun Feb 26, 2006 7:16 am

Enrico,

Thanks! :)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42079
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 54 guests