Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
9
Erster Beitrag:
vor 8 Jahren, 10 Monaten
Letzter Beitrag:
vor 8 Jahren, 10 Monaten
Beteiligte Autoren:
PETER ZHOU, Al, DarrenF, Christoph Erdmann, Novica Njagojevic, DerekT

Changing font colour in table

Startbeitrag von PETER ZHOU am 25.11.2008 03:09

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

Antworten:

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



von Al - am 25.11.2008 03:47
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

von PETER ZHOU - am 25.11.2008 06:35
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





von Novica Njagojevic - am 25.11.2008 07:07
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

von Al - am 25.11.2008 07:11
I use a variation of Al's in the Row Display section of the code editor.............

Myself[Myself][5]..Brushcolor =


Regards

DerekT

von DerekT - am 25.11.2008 08:56
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

von Christoph Erdmann - am 25.11.2008 09:57
Dear All,

Thank you for the reply.

It's working now...

Cheers !

Regards,

PETER ZHOU

von PETER ZHOU - am 25.11.2008 14:57
Hi Peter,

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

Cheers...


von DarrenF - am 26.11.2008 14:42
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.