TWBrowse scrollbar bug

Post Reply
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

TWBrowse scrollbar bug

Post by Enrico Maria Giordano »

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

#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

METHOD VGoDown()       INLINE iif( ::nVScrollPos < ::nLen, ::VSetPos( ::nVScrollPos + 1 ), )
METHOD VGoUp()         INLINE iif( ::nVScrollPos > 1, ::VSetPos( ::nVScrollPos - 1 ), )
EMG
dpaterso
Posts: 142
Joined: Tue Jan 24, 2006 9:45 am
Location: South Africa
Contact:

Post by dpaterso »

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
Contact:

Post by dpaterso »

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
Contact:

Post by dpaterso »

I can't thank you enough!!!

Regards,

Dale.
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Post by Enrico Maria Giordano »

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

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

Post by E. Bartzokas »

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

Post by E. Bartzokas »

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

Post by E. Bartzokas »

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
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Post by Enrico Maria Giordano »

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
E. Bartzokas
Posts: 114
Joined: Tue Feb 14, 2006 8:13 am
Location: Corinth, Greece

Post by E. Bartzokas »

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
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Enrico,

Thanks! :)
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply