Manipulating an object cloned from a group

Klaus Major klaus at major-k.de
Tue Sep 2 06:14:00 EDT 2003


Hi Barry,

> If I clone an object belonging to an invisible group, the new object 
> belongs to that group.
> If I'd like to manipulate that object all by its lonesome (make it 
> visible, change its location,
> and delete it), how would I go about doing this?

You can do this, assumed the name of the cloned grp = "clone"
(not very clever, i know ;-)
...
set the loc of btn "bill" of grp "clone" to 100,100
## will distinguish this button from the button with the same name of 
grp "original"
...
delete btn "bill" of grp "clone"
...

To make one object of an invisible grp visible i would use a 
repeat-loop like:
...
repeat with i = 1 to the num of controls of grp "clone"
     hide control i of grp 1
end repeat
### necessary since we have to set the group to visible!!!
show btn "bill" of grp "clone"
...

Un-/lock screen will speed things up, if you have lots of controls...

Hope that helps...

> TIA,
> Barry

Regards

Klaus Major
klaus at major-k.de
www.major-k.de




More information about the use-livecode mailing list