FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour TWBrowse lCellStyle bug
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
TWBrowse lCellStyle bug
Posted: Mon Mar 12, 2007 07:03 PM
This is the sample:

#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oWnd, oBrw

    DBCREATE( "BUGTEST", { { "TEST1", "C", 10, 0 },;
                           { "TEST2", "C", 10, 0 } } )

    USE BUGTEST

    DEFINE WINDOW oWnd

    @ 0, 0 LISTBOX oBrw FIELDS

    oBrw:lCellStyle = .T.

    oWnd:oClient = oBrw

    ACTIVATE WINDOW oWnd;
             MAXIMIZED

    CLOSE

    RETURN NIL


Try to move one cell right and you will see that a "phantom record" is displayed on the browse.

EMG
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
TWBrowse lCellStyle bug
Posted: Mon Mar 12, 2007 08:33 PM
Enrico,

In both Methods GoLeft() and GoRight() this code has to be included at the beginning:
   if ( ::nLen := Eval( ::bLogicLen, Self ) ) < 1
      return nil
   endif
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
TWBrowse lCellStyle bug
Posted: Mon Mar 12, 2007 09:57 PM
I think that this is better because it allows to scroll horizontally even if there are no records:

         if ::nLen > 0
            ::DrawSelect()
         endif


EMG

Continue the discussion