Selecting an object
J. Landman Gay
jacque at hyperactivesw.com
Sun Mar 13 20:32:04 EDT 2011
On 3/13/11 7:12 PM, Peter Haworth wrote:
> I need to add a control into the group.
>
> After some help from people on the list a couple of weeks ago, I've
> been doing this by selecting the group, ungrouping it, making a group
> command from the selectedObjects property plus the id of the new
> control, then "do" the group command.
That's the long way around. Try this, assuming you want a button:
create btn "new button" in grp "mygroup" of cd "thatCard"
If you're on the same card, just:
create btn "new button" in grp "mygroup"
You can substitute any control for "button". No need to ungroup first,
just plunk it in there. I vaguely remember a discussion about this but I
can't remember why you weren't able to do it this way for some reason.
--
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode
mailing list