TWBrowse lCellStyle bug

TWBrowse lCellStyle bug

Postby Enrico Maria Giordano » Mon Mar 12, 2007 7:03 pm

This is the sample:

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

Postby Antonio Linares » Mon Mar 12, 2007 8:33 pm

Enrico,

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

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

Postby Enrico Maria Giordano » Mon Mar 12, 2007 9:57 pm

I think that this is better because it allows to scroll horizontally even if there are no records:

Code: Select all  Expand view
         if ::nLen > 0
            ::DrawSelect()
         endif


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
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 71 guests