FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Bug in TWBrowse - nClrPane
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Bug in TWBrowse - nClrPane
Posted: Sun Jun 01, 2008 03:38 PM
Just move the cursor on the second column and you will see the first column becoming green:

#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oDlg, oBrw

    USE TEST

    DEFINE DIALOG oDlg;
           SIZE 400, 400

    @ 0, 0 LISTBOX oBrw FIELDS TEST -> last,;
                               TEST -> first

    oBrw:bLogicLen = { || LastRec() }

    oBrw:lCellStyle = .T.

    oBrw:nClrPane = { | nCol | If( nCol = 1, CLR_HRED, CLR_HGREEN ) }

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

    CLOSE

    RETURN NIL


EMG
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Bug in TWBrowse - nClrPane
Posted: Mon Jun 02, 2008 01:05 PM

Enrico,

Have you tested it with previous versions of FWH 8.05 ? thanks,

I mean 8.04, 8.03, ...

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Bug in TWBrowse - nClrPane
Posted: Mon Jun 02, 2008 01:43 PM

nClrPane is a codeblock starting from the current 8.05.

EMG

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Bug in TWBrowse - nClrPane
Posted: Mon Jun 02, 2008 05:20 PM

Enrico,

Yes, you are right, thanks :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Bug in TWBrowse - nClrPane
Posted: Mon Jun 02, 2008 06:24 PM

It seems related to oBrw:lCellStyle = .T.

without it, it works fine

I keep searching...

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Bug in TWBrowse - nClrPane
Posted: Wed Jul 16, 2008 10:09 AM
Enrico,

Fixed! This is the right code for Class TWBrowse line 2282-2284 (a n was missing):
               SetBkColor( hDC, If( nColAct != nil, If( ValType( nClrBack ) == "B",;
                             Eval( nClrBack, n ), nClrBack ),;
                             If( ValType( nClrPane ) == "B", Eval( nClrPane, n ), nClrPane ) ) )

Thanks! :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Bug in TWBrowse - nClrPane
Posted: Wed Jul 16, 2008 11:10 AM

Thank you!

EMG

Posts: 1335
Joined: Fri Jun 13, 2008 11:04 AM
Bug in TWBrowse - nClrPane
Posted: Thu Jul 17, 2008 06:47 AM
Where can I find TWBrowse.Prg to make the updation.

I expected TWBrowse.Prg in the folder \FWH\Source\Classes but I could not find the same anywhere in the FWH Folder

Regards

Anser
FWH 8.06

Antonio Linares wrote:Enrico,

Fixed! This is the right code for Class TWBrowse line 2282-2284 (a n was missing):
               SetBkColor( hDC, If( nColAct != nil, If( ValType( nClrBack ) == "B",;
                             Eval( nClrBack, n ), nClrBack ),;
                             If( ValType( nClrPane ) == "B", Eval( nClrPane, n ), nClrPane ) ) )

Thanks! :-)
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Bug in TWBrowse - nClrPane
Posted: Thu Jul 17, 2008 08:08 AM

\FWH\source\classes\wbrowse.prg

Regards



G. N. Rao.

Hyderabad, India
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Bug in TWBrowse - nClrPane
Posted: Thu Jul 17, 2008 02:08 PM

Anser

You have to ( also ) make the same edit just above those lines and add the ,n to nClrText

Rick

Posts: 1335
Joined: Fri Jun 13, 2008 11:04 AM
Bug in TWBrowse - nClrPane
Posted: Fri Jul 18, 2008 10:05 AM

Thank you,

Mr.Nageswaragunupudi and Mr.Rick Lipkin.

As per your advice I updated \FWH\source\classes\wbrowse.prg

Regards
Anser

Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Bug in TWBrowse - nClrPane
Posted: Fri Jul 18, 2008 03:30 PM

Hello,

This topic is about the background color of columns in a listbox.

But how do I define the background color of a row ?

Thanks.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Bug in TWBrowse - nClrPane
Posted: Fri Jul 18, 2008 03:44 PM
driessen wrote:Hello,

This topic is about the background color of columns in a listbox.

But how do I define the background color of a row ?

Thanks.


oBrw:nClrPane = { | nCol | If( YourCondition, CLR_HRED, CLR_HGREEN ) }


EMG
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Bug in TWBrowse - nClrPane
Posted: Fri Jul 18, 2008 08:03 PM

Enrico,

Isn't your example to define the color of a column ? I want to change the background color of a row.

Thanks.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Bug in TWBrowse - nClrPane
Posted: Fri Jul 18, 2008 08:35 PM

Please try. :-)

EMG