Still Having Data Grid Row Coloring Problems

Trevor DeVore lists at mangomultimedia.com
Tue Mar 23 10:05:44 EDT 2010


On Mar 22, 2010, at 10:52 PM, Len Morgan wrote:

> What I don't see in the sample code that was copied is where the  
> backgroundColor for the hilited line is set to blue.

The color of the hilited line is a property of the data grid. It is  
not set in the behavior script.

  If you go to the Colors & Patterns tab of the inspector then you can  
change the Selection Hilites color. This maps to the dgProp["hilite  
color"] property of the data grid.

> If that piece is somewhere else, I think that is where I need to  
> start looking to do what I'm after.

Would changing the hilite color do what you need?

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

-- 
Trevor DeVore
Blue Mango Learning Systems
ScreenSteps: http://www.screensteps.com
Releasable Revolution Resources for Developers: http://revolution.bluemangolearning.com





More information about the use-livecode mailing list