adding controls to a group

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
kevin11
Posts: 101
Joined: Thu Aug 11, 2011 5:02 pm

adding controls to a group

Post by kevin11 » Sat Nov 26, 2011 2:25 pm

How do you add a control to a group that already exists ?
I know how you can create a group, by supplying a list of controls, but is there a way of adding new controls to that group ?
For example, a group may contain a set of controls, and as a database returns records, a new control has to be added to the group. There may be hundreds of controls that need adding, so supplying huge lists isn't practical.

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: adding controls to a group

Post by jmburnod » Sat Nov 26, 2011 5:32 pm

Hi Kewin,

I think you can use

start editing group "myGroup". have a look at "start editing" entry of the LC dictionary

and any objects created while in group-editing mode are added to that group.

Best regards

Jean-Marc
https://alternatic.ch

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7392
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: adding controls to a group

Post by jacque » Sat Nov 26, 2011 7:01 pm

For scripted solutions, use "create <control> in group <groupname>". For example:

create button "Click Me" in group "mainGrp"
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: adding controls to a group

Post by jmburnod » Sat Nov 26, 2011 11:07 pm

Oh Yes,

create is a better way. More clear more simple

Thanks for this Jaque

Jean-Marc
https://alternatic.ch

Post Reply