PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → [WD19] Coloring a cell in a table problem
[WD19] Coloring a cell in a table problem
Iniciado por guest, 21,jun. 2015 19:57 - 2 respuestas
Publicado el 21,junio 2015 - 19:57
Hi,

I want to colorize the Background of a table cell depending on a value in that table

The following code is in the 'Displaying a row of table' code section:

SWITCH Tabelle.COL_OIDAuftragStatus
CASE 1 : Tabelle.COL_Flag..BrushColor = iWhite
CASE 2 : Tabelle.COL_Flag..BrushColor = iLightGreen
CASE 3 : Tabelle.COL_Flag..BrushColor = iLightBlue
CASE 4 : Tabelle.COL_Flag..BrushColor = iLightRed
OTHER CASE : Tabelle.COL_Flag..BrushColor = iBlack
END

This does not work, obviously because I have to index the table line like

Tabelle[5].COL_Flag..BrushColor = iLightGreen

Colors the cell in the fifth line. Thjs works, but how to Color the actual line, means how do I get the actual line number of the line while this code is running (replacing the fix number '5')

The SWITCH Statement works correct, the correct Color is choosen.

Any ideas?

Erik
Publicado el 21,junio 2015 - 20:14
Hello Eric

Your topic mentions cell so you will still need the column number to do that but the whole line is :
Tabelle[Tabelle]..BrushColor = iLightGreen

The actual cell would be - for column 7 of the current line
Tabelle[Tabelle][7]..BrushColor = iLightGreen

If "COL_Flag" represents the column number then
Tabelle[Tabelle][COL_Flag]..BrushColor = iLightGreen

Regards
Al
Publicado el 22,junio 2015 - 08:07
Hi Al,

that does it :spos:

Thanks ;)

Erik