On Apr 17, 2009, at 7:10 PM, Sadhu Nadesan wrote:

To the fillindata handler, add some code to change the color depending on the contents of the cell. Like this

on FillInData pData
 -- This message is sent when the Data Grid needs to populate
-- this template with the column data. pData is the value to be displayed.
  -- Example:
 set the text of field 1 of me to pData
 if (pData contains "foo") then
    set the backgroundcolor of field 1 of me to "red"
 end if
end FillInData

Now run your stack. put 'bar" in column 2, by clicking the populate button and answering bar. Nothing should happen. Now do it again and answer foo. Again, nothing happens, but the foo cells were expected to be red.

Trevor, is my error obvious to the master?  What have I left out!

Your field is transparent so setting the color won't show up. Just set the opaque flag to true:

 if (pData contains "foo") then
    set the backgroundcolor of field 1 of me to "red"
    set the opaque of field 1 of me to true
 else
    set the opaque of field 1 of me to false
 end if

I tried this in your test stack in the bug report and it worked.

Regards,

--
Trevor DeVore
Blue Mango Learning Systems
www.bluemangolearning.com    -    www.screensteps.com
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to