Bug in TCBrowse

Bug in TCBrowse

Postby Enrico Maria Giordano » Sun Jun 08, 2008 6:26 pm

In the following sample, the currently selected cell is black on black instead of the specified colors:

Code: Select all  Expand view
#include "Fivewin.ch"
#include "Tcbrowse.ch"


FUNCTION MAIN()

    LOCAL oDlg, oBrw

    USE TEST

    DEFINE DIALOG oDlg;
           SIZE 400, 400

    @ 0, 0 BROWSE oBrw

    oBrw:bLogicLen = { || LastRec() }

    oBrw:lCellStyle = .T.

    oBrw:nClrForeFocus = { || CLR_HRED }
    oBrw:nClrBackFocus = { || CLR_HGREEN }

    ADD COLUMN TO oBrw;
               DATA "Data" + LTRIM( STR( RECNO() ) ) + "   ";
               HEADER "DATA"

    ADD COLUMN TO oBrw

    ACTIVATE DIALOG oDlg;
             ON INIT oDlg:SetControl( oBrw );
             CENTER

    CLOSE

    RETURN NIL


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia


Postby Antonio Linares » Mon Jun 23, 2008 11:54 pm

Enrico,

Fixed :-) Please change these lines in Class TCBrowse:

line 506:
nClrFore := If( ValType( nClrForeFocus ) == "B", Eval( nClrForeFocus ), nClrForeFocus )

line 519:
nClrBack := If( ValType( nClrBackFocus ) == "B", Eval( nClrBackFocus ), nClrBackFocus )
regards, saludos

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

Postby Enrico Maria Giordano » Tue Jun 24, 2008 9:09 am

Perfect! :-)

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: Google [Bot] and 55 guests