Still Having Data Grid Row Coloring Problems
Len Morgan
len-morgan at crcom.net
Tue Mar 23 20:14:42 EDT 2010
> Would changing the hilite color do what you need?
>
Not exactly. What I'm trying to do is color each line depending on the
contents of a field of the database. This system tracks inmates and
they can be either released, in-custody, out-to-court, etc. and each one
of these would have a different color so you can see without having to
read a field someone's current status. I've used this color coded
system for over 10 years and it's quite popular with customers because
it requires them to think less.
> I did test out setting column background colors and the missing piece
> was setting the opaque of to true. Here is a modified version of the
> example script:
>
> private command SetForeGroundColor
> if GetDataOfIndex(the dgIndex of me, "line has error") then
> set the backgroundcolor of me to red
> set the opaque of me to true
> else
> set the backgroundcolor of me to empty
> set the opaque of me to false
> end if
> end SetForeGroundColor
>
This worked just like I wanted with one exception which I may not be
able to get (and I'm VERY happy with just having the colored lines).
You already have a column separator line but it would be much easier to
read across (this list takes almost 2/3rds of the screen width) if there
were row borders too. Is there some way to get both colors AND row
separator lines? I noticed that the alternating row colors kind of does
this for you but it's not quite the visual effect I was after.
len morgan
More information about the use-livecode
mailing list