Group Margins

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
Gage
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 224
Joined: Tue Mar 26, 2013 8:59 pm

Group Margins

Post by Gage » Wed May 29, 2013 10:07 pm

Hello,

I have noticed that a few of the groups I create exactly match the outermost edges of the objects it contains, while other groups have a margin of a few extra pixels around the outer most object pixels.

Why is this, and how can I make it so that every group has a border that is exactly the same as the outermost pixel of the objects the group contains?

I have tried setting the borderWidth to 0, but it does not work.

Thanks!
Phil E.

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4172
Joined: Sun Jan 07, 2007 9:12 pm

Re: Group Margins

Post by bn » Wed May 29, 2013 11:13 pm

Hi Phil,

if you create a group it has a default margin of 4, i.e. leftMargin, rightMargin, topMargin and bottomMargin are 4.

In the inspector for the group under Text Formatting you can set the margins to 0 and the group will have the same outermost pixel as the objects (assuming you don't set the border of the group)

Kind regards
Bernd

Gage
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 224
Joined: Tue Mar 26, 2013 8:59 pm

Re: Group Margins

Post by Gage » Thu May 30, 2013 12:41 am

Bernd,

Perfect answer, thank you very much! I had not realized the margins were controllable in the Text Formatting pane of the Property Inspector.

Best,
Phil E.

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

Re: Group Margins

Post by dunbarx » Thu May 30, 2013 2:39 am

Hi.

Just a note that anything that is settable in the property inspector is settable as a property by script. Look up "margin" in the dictionary. In fact, the property inspector is a small subset of available properties for any particular object.

My real point is that if you have an issue with, say, "margins", there is a good chance the dictionary will have the answers.

Craig Newman

Gage
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 224
Joined: Tue Mar 26, 2013 8:59 pm

Re: Group Margins

Post by Gage » Thu May 30, 2013 5:29 pm

Noted. Thank you, Craig.

Phil E.

Post Reply