group all objects and fields

Klaus Major klaus at major-k.de
Sat Jan 22 16:18:41 EST 2005


Hi Bob,

> Hi All.
>
> I want a button on one stack that can group all objects on another 
> stack.
> I cannot see the way to "select all" and group via a command.
>
> IE
>
> on mouse up
> select all objects and fields on card 1 of stack "random.rev" /
> group all selected objects and fields and set the background to true
> end mouse up
>
> OK I just made the script above up but I hope you get the jist.
>
> Any ideas

Yo! :-)

...
repeat with i = 1 to the num of controls on cd 1 of stack xyz
     set the selected of control i of cd 1 of stack xyz to true
end repeat
set the backgroundbehaviour of the templategroup to true
## set the short name of the templategroup to "my group"
## etc...
group
select emtpy
reset the templategroup ## optional
...

Hope that helps.

> Cheers
> Bob; Sunny Scotland

Regards

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



More information about the Use-livecode mailing list