Group members
Richmond Mathewson
richmondmathewson at gmail.com
Tue Jul 28 15:30:21 EDT 2009
James Hurley wrote:
> How do I get a list of all the controls within a group?
> And if they are grouped radio buttons, is the a shortcut to finding
> out which is selected?
>
> Thanks,
>
> Jim Hurley
> _______________________________________________
Devin's solution can be 'nested' quite effectively, removing, along
the way, the need for one to know the names of the groups in a stack:
on mouseUp
put the number of groups in stack "Groupies" into GNUM
put 0 into KOUNT
repeat with y = 1 to GNUM
add 1 to KOUNT
put the name of group y of stack "Groupies" into line KOUNT of fld
"fMEMS"
put the name of group y of stack "Groupies" into GNAME
repeat with x = 1 to the number of controls in GNAME
add 1 to KOUNT
put the name of control x of GNAME into line KOUNT of fld "fMEMS"
end repeat
end repeat
end mouseUp
I have opted to put the results into a textField rather than an
array/string variable
as I want to see them.
More information about the use-livecode
mailing list