data grid hilite of checkbox

Jim Sims sims at ezpzapps.com
Wed May 27 11:40:18 EDT 2009


On May 27, 2009, at 4:05 PM, Trevor DeVore wrote:

> The code should be the same except that you just store the hilite of  
> the checkbox when the user clicks on it. You probably followed the  
> instructions in the lesson "How Can I Store An Option Menu Value  
> When The User Makes a Selection?":
>
> <http://revolution.screenstepslive.com/spaces/revolution_tools/manuals/datagrid/lessons/3836-How-Can-I-Store-An-Option-Menu-Value-When-The-User-Makes-a-Selection- 
> >
>
> Just modify FillInData to set the hilite of the checkbox and instead  
> of calling SetDataOfIndex in menuPick call it in mouseUp.


Thanks for the reply Trevor.

When I tried to follow my interpretation of "The code should be the  
same except that you just store the hilite of the checkbox when the  
user clicks on it." I received an error.

The following gave me the error:  -- button "Col 3 Behavior":  
execution error at line n/a (Object: object does not have this property)

  on mouseUp
    set the U_hilite of me to the hilite of me
    setDataOfIndex the dgIndex of me, the dgColumn of me,   the  
U_hilite of me
end mouseUp

So,  tried a few other stabs in the dark, such as...

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 the hilite of me is "true" then set the uHilite of me to "TRUE"
    if the hilite of me is "false" then set the uHilite of me to "FALSE"
end FillInData

on mouseUp
    setDataOfIndex the dgIndex of me, the dgColumn of me,  the uHilite  
of me
end mouseUp

I'm surely missing something simple as the above seems to get me  
nowhere.


sims



More information about the use-livecode mailing list