Page 1 of 2
Bug in TWBrowse - nClrPane
Posted: Sun Jun 01, 2008 3:38 pm
by Enrico Maria Giordano
Just move the cursor on the second column and you will see the first column becoming green:
Code: Select all
#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
Posted: Mon Jun 02, 2008 1:05 pm
by Antonio Linares
Enrico,
Have you tested it with previous versions of FWH 8.05 ? thanks,
I mean 8.04, 8.03, ...
Posted: Mon Jun 02, 2008 1:43 pm
by Enrico Maria Giordano
nClrPane is a codeblock starting from the current 8.05.
EMG
Posted: Mon Jun 02, 2008 5:20 pm
by Antonio Linares
Enrico,
Yes, you are right, thanks
Posted: Mon Jun 02, 2008 6:24 pm
by Antonio Linares
It seems related to oBrw:lCellStyle = .T.
without it, it works fine
I keep searching...
Posted: Wed Jul 16, 2008 10:09 am
by Antonio Linares
Enrico,
Fixed! This is the right code for Class TWBrowse line 2282-2284 (a n was missing):
Code: Select all
SetBkColor( hDC, If( nColAct != nil, If( ValType( nClrBack ) == "B",;
Eval( nClrBack, n ), nClrBack ),;
If( ValType( nClrPane ) == "B", Eval( nClrPane, n ), nClrPane ) ) )
Thanks!
Posted: Wed Jul 16, 2008 11:10 am
by Enrico Maria Giordano
Thank you!
EMG
Posted: Thu Jul 17, 2008 6:47 am
by anserkk
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):
Code: Select all
SetBkColor( hDC, If( nColAct != nil, If( ValType( nClrBack ) == "B",;
Eval( nClrBack, n ), nClrBack ),;
If( ValType( nClrPane ) == "B", Eval( nClrPane, n ), nClrPane ) ) )
Thanks!
Posted: Thu Jul 17, 2008 8:08 am
by nageswaragunupudi
\FWH\source\classes\wbrowse.prg
Posted: Thu Jul 17, 2008 2:08 pm
by Rick Lipkin
Anser
You have to ( also ) make the same edit just above those lines and add the ,n to nClrText
Rick
Posted: Fri Jul 18, 2008 10:05 am
by anserkk
Thank you,
Mr.Nageswaragunupudi and Mr.Rick Lipkin.
As per your advice I updated \FWH\source\classes\wbrowse.prg
Regards
Anser
Posted: Fri Jul 18, 2008 3:30 pm
by driessen
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.
Posted: Fri Jul 18, 2008 3:44 pm
by Enrico Maria Giordano
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.
Code: Select all
oBrw:nClrPane = { | nCol | If( YourCondition, CLR_HRED, CLR_HGREEN ) }
EMG
Posted: Fri Jul 18, 2008 8:03 pm
by driessen
Enrico,
Isn't your example to define the color of a column ? I want to change the background color of a row.
Thanks.
Posted: Fri Jul 18, 2008 8:35 pm
by Enrico Maria Giordano
Please try.
EMG