Still a beginner who doesn't know how to make a group.
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Still a beginner who doesn't know how to make a group.
I've tried following instructions to set up a group; I tried doing it via code in message box and I tried selecting each control. Neither produced a group. I really need a click by click instruction to set it up.
-
- VIP Livecode Opensource Backer
- Posts: 9678
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Still a beginner who doesn't know how to make a group.
CAsba.
1- On a new card make three radio buttons. Select all three. Click on the "Group" menu in the LC menubar.
2- Delete the group you made above. Make three new buttons. In the message box: "group btn 1 and btn 2 and btn 3"
That will at least get you started.
Craig
1- On a new card make three radio buttons. Select all three. Click on the "Group" menu in the LC menubar.
2- Delete the group you made above. Make three new buttons. In the message box: "group btn 1 and btn 2 and btn 3"
That will at least get you started.
Craig
Re: Still a beginner who doesn't know how to make a group.
Hi CAsba,
do this:
1. Select the first of your controls you want to group.
2. Hold the shift-key and click the next control, now two controls are selected.
3. Do this for the rest of your controls
4. Now all controls that you want to group are selected.
5. LC menu: Object -> Group selected (CMD-G)
6, Give your new group a name and that's it!
If you want to do thos via script, do this:
Now you can copy that group to wherever you want to:
Hope that helps!
Best
Klaus
do this:
1. Select the first of your controls you want to group.
2. Hold the shift-key and click the next control, now two controls are selected.
3. Do this for the rest of your controls
4. Now all controls that you want to group are selected.
5. LC menu: Object -> Group selected (CMD-G)
6, Give your new group a name and that's it!
If you want to do thos via script, do this:
Code: Select all
...
set the selected of fld "lastselection" to TRUE
set the selected of fld "lastselection2" to TRUE
set the selected of btn "Start again" to TRUE
set the selected of btn "go back" to TRUE
set the selected of grc "Rectangle" to TRUE
## Now all of your objects are selected, now:
group
## Done! :-)
## Deselect the controls:
select empty
...
Code: Select all
...
copy grp "name of your group" to cd 42 of stack "another stack"
...
Best
Klaus
-
- VIP Livecode Opensource Backer
- Posts: 9678
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Still a beginner who doesn't know how to make a group.
CAsba.
Your new groups can be managed just like any other control. A group is just a control that contains other controls. You can name your group, change its dimensions (something you might play with, since that takes some time to get used to as regards the members of the group) and all the other typical things that controls have and can do.
Groups do have their own particular properties. These are good things, but you have to learn about them.
Craig
Your new groups can be managed just like any other control. A group is just a control that contains other controls. You can name your group, change its dimensions (something you might play with, since that takes some time to get used to as regards the members of the group) and all the other typical things that controls have and can do.
Groups do have their own particular properties. These are good things, but you have to learn about them.
Craig
-
- VIP Livecode Opensource Backer
- Posts: 9678
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Still a beginner who doesn't know how to make a group.
CAsba
I see from Klaus other methodologies, and in LC, we know there are many ways to do things.
Craig
I see from Klaus other methodologies, and in LC, we know there are many ways to do things.
Craig
-
- VIP Livecode Opensource Backer
- Posts: 9678
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Still a beginner who doesn't know how to make a group.
CAsba
Once you have your group, play with it. Especially play with the "Select Grouped" (a terrible name) menu in the LC menubar. This allows you to toggle between having the child controls selectable individually, or to be "held" entirely in the group.
So hilite that menu. Now you can move one of your child controls around the card. If you then click on that button again, you will see that the group has reformed, and also resized itself to accommodate the locs of all the children.
Play. Write back when you have been able to add another control to your existing group.
Craig
Once you have your group, play with it. Especially play with the "Select Grouped" (a terrible name) menu in the LC menubar. This allows you to toggle between having the child controls selectable individually, or to be "held" entirely in the group.
So hilite that menu. Now you can move one of your child controls around the card. If you then click on that button again, you will see that the group has reformed, and also resized itself to accommodate the locs of all the children.
Play. Write back when you have been able to add another control to your existing group.
Craig
-
- Livecode Opensource Backer
- Posts: 9417
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Still a beginner who doesn't know how to make a group.
This point is slightly off-topic, but I do believe is useful to know:
If you group several objects and then give that group a name, then, at a later date, ungroup the group, that group continues to 'exist' even though it no longer contains the objects it previously contained.
So, if you, subsequently, group another set of objects they will be grouped into the previous group:
Here is a pictorial demo of this slightly annoying phenomenon.
Here I have 2 sets of buttons, and the first 3 are grouped into a group called "three buttons":
- -
Now, here I have ungrouped those 3 buttons and grouped the other 3 buttons, and, as you can see the group is the same group as I used previously:
- -
If you LOCK your group, if you do the same thing as above the group will retain the bounding rectangle it had, and the second set of buttons will not be visible.
THEREFORE, if you ungroup a group and want to avoid that situation, it is quite a good idea to place a random object on your card, group it and then, via the messageBox DELETE the group.
If you group several objects and then give that group a name, then, at a later date, ungroup the group, that group continues to 'exist' even though it no longer contains the objects it previously contained.
So, if you, subsequently, group another set of objects they will be grouped into the previous group:
Here is a pictorial demo of this slightly annoying phenomenon.
Here I have 2 sets of buttons, and the first 3 are grouped into a group called "three buttons":
- -
Now, here I have ungrouped those 3 buttons and grouped the other 3 buttons, and, as you can see the group is the same group as I used previously:
- -
If you LOCK your group, if you do the same thing as above the group will retain the bounding rectangle it had, and the second set of buttons will not be visible.
THEREFORE, if you ungroup a group and want to avoid that situation, it is quite a good idea to place a random object on your card, group it and then, via the messageBox DELETE the group.
Re: Still a beginner who doesn't know how to make a group.
Hi guys,
Thanks for all that. I managed to make a group ! Of course, it's simple when you know how, but for me, the click by click instructions were essential. One other thing..I named the group 'Group1' by editing the group NUMBER that showed up in the PB - and it functions.
Is that the usual way to name the group - I didn't see any other options for naming.
Once again, many thanks.
Thanks for all that. I managed to make a group ! Of course, it's simple when you know how, but for me, the click by click instructions were essential. One other thing..I named the group 'Group1' by editing the group NUMBER that showed up in the PB - and it functions.
Is that the usual way to name the group - I didn't see any other options for naming.
Once again, many thanks.
-
- Livecode Opensource Backer
- Posts: 9417
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Still a beginner who doesn't know how to make a group.
I always name my groups like this:
- - -
Obviously the group has to be SELECTED and that only happens right after you have grouped the objects.
What I like about this is that you can set other parameters of the group:
-
- - -
Obviously the group has to be SELECTED and that only happens right after you have grouped the objects.
What I like about this is that you can set other parameters of the group:
-
Re: Still a beginner who doesn't know how to make a group.
Hi CAsba
Jokes aside, whatever name fits for your project and is meaningful enough will do!
Best
Klaus
well, you can name your group "Susan" if that makes you happy!
Jokes aside, whatever name fits for your project and is meaningful enough will do!
Best
Klaus
Re: Still a beginner who doesn't know how to make a group.
Hi Klaus,
Susan, yeah, how come you know about Susan ? This is a most private part of my life ! Was it you who....?
(Still joking)
My query was open to misinterpretation.. I meant to ask 'is this the usual method to name a group ?' (doing it in project browser).
Also, I just tried to put fld "xxx" into fld "selection2" of group "group1" of cd "yyy" and it didn't work. Maybe the group is inappropriate here ?
Susan, yeah, how come you know about Susan ? This is a most private part of my life ! Was it you who....?
(Still joking)
My query was open to misinterpretation.. I meant to ask 'is this the usual method to name a group ?' (doing it in project browser).
Also, I just tried to put fld "xxx" into fld "selection2" of group "group1" of cd "yyy" and it didn't work. Maybe the group is inappropriate here ?
Re: Still a beginner who doesn't know how to make a group.
Hi CAsba,
I tried exactly this:
and it worked as exspected!? Did you get an error or something?
Best
Klaus
P.S.
Clairvoyance is one of my hobbies!
I tried exactly this:
Code: Select all
...
put fld "xxx" into fld "selection2" of group "group1" of cd "yyy"
...
Yes, via script or the inspector, there are no other ways.I meant to ask 'is this the usual method to name a group ?' (doing it in project browser).
Best
Klaus
P.S.
Clairvoyance is one of my hobbies!
-
- Livecode Opensource Backer
- Posts: 9417
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Still a beginner who doesn't know how to make a group.
Wow! Must give it a try sometime: I suppose it'll make a difference from doing it in the bed.(doing it in project browser)
As I have already indicated, you can "do it" via the Properties palette.
As to:
There are at least 4 ways I know of naming a group:the usual method to name a group
1. via the Properties palette.
2. scripting via the messageBox.
3. via the Application browser.
4. via the Project browser.
as to 'usual' and 'normal': well, luckily, we don't have to worry about that as xTalk is marvellous in that almost always one can achieve something in many different ways.
Re: Still a beginner who doesn't know how to make a group.
Ah, yes, forogt the "Project Browser"!
A docubleclick on the name of an object in the PB also lets you give it another name.
A docubleclick on the name of an object in the PB also lets you give it another name.