FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour TWBrowse scrollbar bug
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
TWBrowse scrollbar bug
Posted: 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):

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

METHOD VGoDown()       INLINE iif( ::nVScrollPos < ::nLen, ::VSetPos( ::nVScrollPos + 1 ), )
METHOD VGoUp()         INLINE iif( ::nVScrollPos > 1, ::VSetPos( ::nVScrollPos - 1 ), )


EMG
Posts: 142
Joined: Tue Jan 24, 2006 09:45 AM
TWBrowse scrollbar bug
Posted: 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.

Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
TWBrowse scrollbar bug
Posted: Thu Feb 23, 2006 12:29 PM

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

EMG

Posts: 142
Joined: Tue Jan 24, 2006 09:45 AM
TWBrowse scrollbar bug
Posted: Thu Feb 23, 2006 01: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.

Posts: 142
Joined: Tue Jan 24, 2006 09:45 AM
TWBrowse scrollbar bug
Posted: Thu Feb 23, 2006 02:02 PM

I can't thank you enough!!!

Regards,

Dale.

Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
TWBrowse scrollbar bug
Posted: Thu Feb 23, 2006 02:04 PM

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

EMG

Posts: 114
Joined: Tue Feb 14, 2006 08:13 AM
TWBrowse scrollbar bug
Posted: Thu Feb 23, 2006 07: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
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
TWBrowse scrollbar bug
Posted: Thu Feb 23, 2006 08:22 PM

Have you tried oBrw:nLineStyle?

EMG

Posts: 114
Joined: Tue Feb 14, 2006 08:13 AM
TWBrowse scrollbar bug
Posted: Thu Feb 23, 2006 09:31 PM
EnricoMaria wrote:Have you tried oBrw:nLineStyle?

EMG

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

Kind regards
Evans
Posts: 114
Joined: Tue Feb 14, 2006 08:13 AM
TWBrowse scrollbar bug
Posted: 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)
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
TWBrowse scrollbar bug
Posted: 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
Posts: 114
Joined: Tue Feb 14, 2006 08:13 AM
TWBrowse scrollbar bug
Posted: Fri Feb 24, 2006 04: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.
:-)
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
TWBrowse scrollbar bug
Posted: Fri Feb 24, 2006 04:59 PM

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

EMG

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
TWBrowse scrollbar bug
Posted: Sun Feb 26, 2006 07:16 AM

Enrico,

Thanks! :)

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion