set imageSource of text in Data Grid?
Phil Davis
revdev at pdslabs.net
Tue Dec 4 02:34:39 EST 2012
Thanks to Glen Bojsza off-list for getting me started in the right
direction. Here is what I did in the column behavior script, assuming
pData is either a space or an image ID:
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 is a number then
set text of fld 1 of me to space
set the imageSource of char 1 of fld 1 of me to pData
else
set text of fld 1 of me to pData
end if
end FillInData
Thanks -
Phil Davis
On 12/3/12 9:12 PM, Phil Davis wrote:
> Hi folks -
>
> Let's say I have a data grid containing a list of tasks, where each
> line has two columns - col 1 is the task description and col 2 is a
> space character. As each task completes, I want my code to set the
> imageSource of col 2 of that line to the ID of a little "checkmark"
> image. I feel sure this can be done, I'm just not sure how to approach
> it.
>
> Your ideas are most welcome!
>
--
Phil Davis
More information about the use-livecode
mailing list