How do I reference an image in a group in a Data Grid form from outside the grid?
Josh Mellicker
josh at dvcreators.net
Fri Sep 9 19:34:27 EDT 2011
On Sep 9, 2011, at 2:36 PM, zryip theSlug wrote:
> On Fri, Sep 9, 2011 at 11:03 PM, Josh Mellicker <josh at dvcreators.net> wrote:
>> Just wondering what best practices are when wanting to reference an image (or button or other non-text field control) in a Data Grid form.
>>
>>
>> img "blueCircle" of grp x of grp "DataGrid"
>>
>> works, but x does not seem to correlate with either the index or line number.
>>
>>
>> So, does anyone know:
>>
>> 1. what x is?
>>
>> 2. how to get x (the group number of the group containing the image) when the image is clicked on?
>>
>> 3. Any other way to easily reference a control in a Data Grid form?
>>
>> Thanks in advance!
>
> Hi Josh,
>
> Have a look to the dgDataControlOfIndex property in the datagrid API:
> http://lessons.runrev.com/s/lessons/m/datagrid/l/7344-Data-Grid-API
>
>
> Best regards,
> --
> -Zryip TheSlug- wish you the best! 8)
> http://www.aslugontheroad.co.cc
Thanks for the reply Zryip!
I can't get dgDataControlOfIndex to work, anyone know of any code examples?
hide btn "blueCircle" of dgDataControlOfIndex[2]
and
hide btn "blueCircle" of grp dgDataControlOfIndex[2]
both result in errors, so I'm going to hack a solution based on the long id of the graphic with cached controls on. Thanks for trying though!
More information about the use-livecode
mailing list