Looking for a control in a group

Mark Schonewille m.schonewille at economy-x-talk.com
Mon Feb 18 17:48:55 EST 2008


Hoi François,

The easiest way probably is

repeat with x = 1 to number of controls of grp "blabla"
   -- do something with control x of grp "blabla"
end repeat

It might be faster to make a list of id numbers of controls that  
satisfy particular conditions as you make those controls. You can  
keep such a list in a custom property. That way, you can call the  
controls directly. You might want to do this, if you have a very  
large number of controls in your group.

Best regards,

Mark Schonewille

--

Economy-x-Talk Consulting and Software Engineering
http://economy-x-talk.com
http://www.salery.biz

Convert colours between different colour spaces with Color Converter.  
Download at http://economy-x-talk.com/cc.html



Op 18-feb-2008, om 23:37 heeft François Vanzeveren het volgende  
geschreven:

>     Hello All,
>
> I am trying to write a piece of code to search for a control (based  
> on the
> ID) within a group.
> I am looking for something like
> Foreach field f in group “mygroup”
> -- do something on f
> End
>
> How can I do sth like this? Maybe there is a faster way to find a  
> specific
> control within a group?
>
> Thanks for your help.
>
> François




More information about the use-livecode mailing list