Bug in TCBrowse

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

Bug in TCBrowse

Post by Enrico Maria Giordano »

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

Code: Select all

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

Post by Antonio Linares »

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
Post Reply