Cannot keep groups intact
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Cannot keep groups intact
In a project I have a few dozen small groups. Each group contains one field and one button. They are all similarly constructed, with the field on top of the button. A process selects certain groups in a certain order, and places them side by side in a line. I use the left and right properties of each group to locate the position of its upcoming adjacent neighbor This works just fine, sort of.
The groups keep changing their rects, invariably growing larger after many such operations. This ruins the result, with the groups spreading out along the line since their "size" properties keep changing. I have a tool that sets custom properties for the desired rect and loc of each group. Running that works fine, but after a few actual lineups, the rects change. How that is possible is the mystery. Why they ignore their rect-setting custom property is another.
I just tried setting the lockLoc and clipsToRect properties of each group. Will see if that makes a difference, though I cannot imagine how it should.
Craig
The groups keep changing their rects, invariably growing larger after many such operations. This ruins the result, with the groups spreading out along the line since their "size" properties keep changing. I have a tool that sets custom properties for the desired rect and loc of each group. Running that works fine, but after a few actual lineups, the rects change. How that is possible is the mystery. Why they ignore their rect-setting custom property is another.
I just tried setting the lockLoc and clipsToRect properties of each group. Will see if that makes a difference, though I cannot imagine how it should.
Craig
Re: Cannot keep groups intact
Well, setting those two properties fixed the waywardness of those groups.
As I am fond of saying, I am happy to resolve a problem even if I do not understand the solution.
Craig
As I am fond of saying, I am happy to resolve a problem even if I do not understand the solution.
Craig
-
- VIP Livecode Opensource Backer
- Posts: 10044
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Cannot keep groups intact
The lockLoc property prevents default resizing of objects.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Cannot keep groups intact
Richard. I know, and I should have just set it from the start. But that does not explain why they did that in the first place.
Craig
Craig
-
- VIP Livecode Opensource Backer
- Posts: 10044
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Cannot keep groups intact
But it does. By default, groups adjust to be able to show their contents.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Cannot keep groups intact
Richard.
I never adjusted the relationship between the child button and the field. I only moved the group itself around the card.
This really happened. The first time or two I carefully resized the group boundaries so that it was just barely larger than the two child controls inside.That way when I created lines of groups I could control the spacing between them. When the groups started to expand erratically, the spacing became erratic.
Just me again?
Craig
I never adjusted the relationship between the child button and the field. I only moved the group itself around the card.
This really happened. The first time or two I carefully resized the group boundaries so that it was just barely larger than the two child controls inside.That way when I created lines of groups I could control the spacing between them. When the groups started to expand erratically, the spacing became erratic.
Just me again?
Craig
Re: Cannot keep groups intact
The default is to expand groups to fit the content. You have to change the group properties to turn that off.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Cannot keep groups intact
Jacque.
When the groups expanded, they did so in both height and width, and always created a wider empty space on the left than on the right. That is they did not expand symmetrically about the child controls.
Just me.
Craig
Sure, but the text of the field never changed. The button was actually a pulldown, but was sized so that no selection from its possible menu choices exceeded its width. I did that so that I could arrange the groups evenly spaced along a row.The default is to expand groups to fit the content.
When the groups expanded, they did so in both height and width, and always created a wider empty space on the left than on the right. That is they did not expand symmetrically about the child controls.
Just me.

Craig
-
- VIP Livecode Opensource Backer
- Posts: 10044
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Cannot keep groups intact
Sounds odd, but without seeing an example I can't have an informed opinion about what's happening.dunbarx wrote: ↑Sun Dec 22, 2024 2:59 amRichard.
I never adjusted the relationship between the child button and the field. I only moved the group itself around the card.
This really happened. The first time or two I carefully resized the group boundaries so that it was just barely larger than the two child controls inside.That way when I created lines of groups I could control the spacing between them. When the groups started to expand erratically, the spacing became erratic.
Just me again?
Craig
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Cannot keep groups intact
Richard, Jacque.
Not my first bizarre rodeo. Anyway, changing properties solved it, and you know what I think about solving problems without understanding how.
Craig
Not my first bizarre rodeo. Anyway, changing properties solved it, and you know what I think about solving problems without understanding how.
Craig
-
- VIP Livecode Opensource Backer
- Posts: 10044
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Cannot keep groups intact
Happy to help if it becomes possible to do so. What property changes fixed it?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Cannot keep groups intact
Richard.
I set the lockLoc of each group. I also set their clipsToRect property, which I had barely ever heard of, just because it was right there in the inspector. LockLoc does not prevent relocating a control under script control, just under mouse action, so arranging groups in a line was unaffected. But it made those groups behave in terms of sticking to their #@%^&$# widths and heights.
Craig
I set the lockLoc of each group. I also set their clipsToRect property, which I had barely ever heard of, just because it was right there in the inspector. LockLoc does not prevent relocating a control under script control, just under mouse action, so arranging groups in a line was unaffected. But it made those groups behave in terms of sticking to their #@%^&$# widths and heights.
Craig
-
- VIP Livecode Opensource Backer
- Posts: 10044
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Cannot keep groups intact
Had you also tried not setting that property?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn