FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Bug in TCBrowse
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Bug in TCBrowse
Posted: Sun Jun 08, 2008 06:26 PM
In the following sample, the currently selected cell is black on black instead of the specified colors:

#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
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Bug in TCBrowse
Posted: 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
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM

Continue the discussion