Page 1 of 1

Adding an object to an existing group

Posted: Sat Sep 01, 2012 4:34 pm
by exheusden
I have a group of nine buttons. I now wish to add a tenth button to the group. I have tried ungrouping, placing the button, selecting all ten and grouping, but the group properties still only shows 9 elements and the new button does not cause the group script to run.

How can I add another button to a pre-existng group of buttons?

Re: Adding an object to an existing group

Posted: Sat Sep 01, 2012 5:03 pm
by bn
Hi,

you have several options:
manually you can cut the button from the card. Select the group and go into group editing. Paste the button. The button is now member of the group.
By script you can do it this way:

Code: Select all

on mouseUp
   put the layer of group "myGroup" into tLayer
   set the relayerGroupedControls to true
   set the layer of button "myButton" to tLayer +1
   set the relayerGroupedControls to false
end mouseUp
Kind regards
Bernd

Re: Adding an object to an existing group

Posted: Sat Sep 01, 2012 5:26 pm
by exheusden
Cutting and pasting the button doesn't work. The group remains with just the nine original members. This is what I tried to explain in my first post: " I have tried ungrouping, placing the button, selecting all ten and grouping…" Perhaps there's a step I'm missing something in the GUI. The only way I was able to do it was through the message-box, with create button "Help init" in group "Templates".

Re: Adding an object to an existing group

Posted: Sat Sep 01, 2012 5:31 pm
by bn
Cutting and pasting the button doesn't work. The group remains with just the nine original members
It works for me. Did you go into editing mode for the group before pasting?

Kind regards
bernd

Re: Adding an object to an existing group

Posted: Sat Sep 01, 2012 6:00 pm
by exheusden
I expect I didn't. I shall try that. Many thanks.

Re: Adding an object to an existing group

Posted: Sat Sep 01, 2012 6:13 pm
by dunbarx
Another option:

copy "yourButton" to group "yourGroup"

Craig Newman