Grouping. \

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
eurolinkalGA2402
Posts: 2
Joined: Mon Dec 05, 2011 5:33 pm

Grouping. \

Post by eurolinkalGA2402 » Wed Aug 05, 2020 7:46 pm

I'm a newbie working my way through training lessons. I have previously been able to get a handle on groups. But in the last few days if I select some objects and try to group them they will get the box around them and the inspector will show them a group. But when I deselect them, then click on one of the objects they are no longer a group but only exist as individual items. And if I select all the same objects and try to group them again I just get a beep and nothing happens. Is there some setting that I may have inadvertantly changed?

SparkOut
Posts: 2947
Joined: Sun Sep 23, 2007 4:58 pm

Re: Grouping. \

Post by SparkOut » Wed Aug 05, 2020 7:49 pm

in the menu bar, you can toggle the "select grouped" option, it looks like that is the case here. You probably don't need to group them again, I expect they are still grouped. Just toggle select grouped and see if behaviour reverts to how you expect.

eurolinkalGA2402
Posts: 2
Joined: Mon Dec 05, 2011 5:33 pm

Re: Grouping. \

Post by eurolinkalGA2402 » Wed Aug 05, 2020 8:19 pm

That seems to be it. Thanks so much!

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10049
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Grouping. \

Post by FourthWorld » Wed Aug 05, 2020 8:31 pm

Bonus tip: in addition to the global selectGroupedControls property that you can toggle in the IDE as SparkOut suggested, there's also a selectGroupedControls property you can set on the group itself. Most of the time it's not needed, but if you want that group to have its interior contents not selectable as individual objects you can set the group's selectGroupedControls property to false and then it will always behave with the pointer tool like a sort of custom control, regardless of what the global property is set to. This is how the DataGrid works.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10320
Joined: Wed May 06, 2009 2:28 pm

Re: Grouping. \

Post by dunbarx » Wed Aug 05, 2020 8:36 pm

Hi.

I am constantly toggling that property for a group in order to move controls individually, resize individually, whatever, individually. Or even a few at a time, always a subset of the total within the group.

I always use the menuBar method.

Craig

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10049
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Grouping. \

Post by FourthWorld » Wed Aug 05, 2020 8:46 pm

The menu bar method is the most convenient way to handle most group interactions.

I flagged my reply as "Bonus" because it's about something different, making custom controls. It's technically off-topic here in a strict sense, but seemed worth adding because knowing about the object property can be useful for many other things down the road.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

bogs
Posts: 5480
Joined: Sat Feb 25, 2017 10:45 pm

Re: Grouping. \

Post by bogs » Wed Aug 05, 2020 9:25 pm

If it is any consolation, I'm glad you mentioned it, since I'm often creating my own controls by bashing multiple controls together (depending on what I expect it to do) :D
Image

Post Reply