Welcome! Log In Create A New Profile

Advanced

changing colour of a table row

Posted by Patrick Thijs 
Patrick Thijs
changing colour of a table row
March 09, 2009 06:30AM
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
END

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 ?

greetz,

Patrick
(I'm using WD14)
David Egan
Re: changing colour of a table row
March 09, 2009 07:00AM
Hi Patrick
Table[row]..brushcolor= whatever. This doesn't move your selected row at all

Regards

David
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: