How to check if a group contains a specific control ?

Klaus major-k klaus at major-k.de
Fri Aug 23 07:45:56 EDT 2024


Hi jbv,

> Am 23.08.2024 um 13:27 schrieb jbv via use-livecode <use-livecode at lists.runrev.com>:
> 
> Hi list,
> 
> Is there a quick way to check if a group contains a specific control,
> something like :
> if there is a fld "xyz" in grp "abc" of this cd
> I tried many things but it always generates an error.
> So far, the only way I can think of is to maintain a custom prop
> for each group, featuring a string that is the list of all controls
> names of the group.

if you don't have any other controls with the same name, 
you could check: 
-> lineoffset("xyz",the childcontrolnames of grp "abc")

> Thank you in advance.
> jbv

Best

Klaus

--
Klaus Major
https://www.major-k.de
https://www.major-k.de/bass
klaus at major-k.de




More information about the use-livecode mailing list