TWBrowse lCellStyle bug

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

TWBrowse lCellStyle bug

Post by Enrico Maria Giordano »

This is the sample:

Code: Select all

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

Post by Antonio Linares »

Enrico,

In both Methods GoLeft() and GoRight() this code has to be included at the beginning:

Code: Select all

   if ( ::nLen := Eval( ::bLogicLen, Self ) ) < 1
      return nil
   endif
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Post by Enrico Maria Giordano »

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

Code: Select all

         if ::nLen > 0
            ::DrawSelect()
         endif
EMG
Post Reply