Welcome! Log In Create A New Profile

Advanced

Changing font colour in table

Posted by PETER ZHOU 
PETER ZHOU
Changing font colour in table
November 25, 2008 04:09AM
Hi,

Based on certain condition, i need to change the font colour in the column within a TABLE.

i've the following code in the ROW DISPLAY OF TABLE

IF Age >= 30 THEN
Table_Vacancy.COL_TurnTime[MySelf]..BrushColor = iLightYellow
Table_Vacancy.COL_TurnTime[MySelf]..Color = LightRed
ELSE
Table_Vacancy.COL_TurnTime[MySelf]..BrushColor = DefaultColor
Table_Vacancy.COL_TurnTime[MySelf]..Color = DefaultColor
END

But it's not working...

Can anybody help ?

Regards,

PETER ZHOU
Al
Re: Changing font colour in table
November 25, 2008 04:47AM
Hello Peter

I have always used the column number rather than the name. This can be a pain to adminster if there are changes to the column layout, but at least it works.

For column number 10 in the table.
It doesn't matter about hidden columns or subsequent column movements by the client, it will still work.

Table_Vacancy[Table_Vacancy][10]..BrushColor = ILightYellow
Table_Vacancy[Table_Vacancy][10]..Color = LightRed


Regards
Al

PETER ZHOU
Re: Changing font colour in table
November 25, 2008 07:35AM
Quote
Al
Hello Peter

I have always used the column number rather than the name. This can be a pain to adminster if there are changes to the column layout, but at least it works.

For column number 10 in the table.
It doesn't matter about hidden columns or subsequent column movements by the client, it will still work.

Table_Vacancy[Table_Vacancy][10]..BrushColor = ILightYellow
Table_Vacancy[Table_Vacancy][10]..Color = LightRed


Regards
Al

Hi Al,

I've used your example but it's not working...

Is the code suppose to be in the ROW DISPLAY ?

Regards,

PETER ZHOU
Novica Njagojevic
Re: Changing font colour in table
November 25, 2008 08:07AM
Try the next code in ROW DISPLAY OF TABLE

IF Age >= 30 THEN
Table_Vacancy.COL_TurnTime[CurrentSubscript()]..BrushColor = iLightYellow
Table_Vacancy.COL_TurnTime[CurrentSubscript()]..Color = LightRed
ELSE
Table_Vacancy.COL_TurnTime[CurrentSubscript()]..BrushColor = DefaultColor
Table_Vacancy.COL_TurnTime[CurrentSubscript()]..Color = DefaultColor
END



Al
Re: Changing font colour in table
November 25, 2008 08:11AM
Hello Peter

Yes I use that code in the row display of a table.

It will change the colour of the cell, not the whole column.

In case I got the details of your table wrong the syntax is

TableName[TableName][ColumnNumber]..brushcolor = ILightYellow


Regards
Al
DerekT
Re: Changing font colour in table
November 25, 2008 09:56AM
I use a variation of Al's in the Row Display section of the code editor.............

Myself[Myself][5]..Brushcolor =


Regards

DerekT
Christoph Erdmann
Re: Changing font colour in table
November 25, 2008 10:57AM
Hi Peter,

use tablename[row,colnumber]..brushcolor or in the rowdisplay section tablename[tablename,colnumber].

I use WD8 - maybe it is changed in WD 10-12

Christoph
PETER ZHOU
Re: Changing font colour in table
November 25, 2008 03:57PM
Dear All,

Thank you for the reply.

It's working now...

Cheers !

Regards,

PETER ZHOU
DarrenF
Re: Changing font colour in table
November 26, 2008 03:42PM
Hi Peter,

I'll need to do something like this soon - which solution solved it?

Cheers...
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: