Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 9 Jahren, 3 Monaten
Letzter Beitrag:
vor 9 Jahren, 3 Monaten
Beteiligte Autoren:
David Egan, Patrick Thijs

changing colour of a table row

Startbeitrag von Patrick Thijs am 09.03.2009 05:30

Hello !

I'm looking for a way to do the following :

I have a table where every row has a brushcolor based on the content of a column called "status".
For example when status = 1 the brushcolor is white, when status = 2 it's blue.
In the linedisplay event of the table I do this :

SWITCH tblTracks.Status
CASE 1 // on disk
tblTracks[tblTracks]..Color = iWhite

CASE 2 // on site
tblTracks[tblTracks]..Color = RGB(153,153,255)

CASE 3 // requested
tblTracks[tblTracks]..Color = RGB(255,128,0)

CASE 4 // new
tblTracks[tblTracks]..Color = RGB(255,255,0)

CASE 5 // favorite
tblTracks[tblTracks]..Color = iLightGreen

This works very well, but my problem is that I want to be able to change the color of a certain row also after the complete table has been filled.
For example : the table contains 50 rows, and I want the 25th row to change from white to red. This shouldn't be so complicated as well, but there are some things that has to be respected :

- when the user has selected another row than the one that should change color, this row should stay selected. The selected row should stay on it's original place also, when it was the 5th row displayed before I change the color, it should stay the 5th line after the change of color.

Any suggestions how to get this working properly ?


(I'm using WD14)


Hi Patrick
Table[row]..brushcolor= whatever. This doesn't move your selected row at all



von David Egan - am 09.03.2009 06:00
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.