[SOLVED] Groups always 8 pixels bigger

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
nlexa
Posts: 26
Joined: Fri Aug 05, 2011 2:34 am

[SOLVED] Groups always 8 pixels bigger

Post by nlexa » Thu Nov 08, 2012 5:10 am

Make a new Stack
Drag on a button
Group the button

in the application browser we have a button and a group.
Use the inspector to check the size of the button and the size of the group.
The group is always 8 pixels taller and 8 pixels wider

Is this normal? Can I make the group exactly the size of its contents? Will this border ever be larger or smaller than 8 pixels? How do I control this padding?
groupPadding.JPG
Last edited by nlexa on Thu Jul 11, 2013 6:01 am, edited 1 time in total.

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

Re: Groups always 8 pixels bigger

Post by FourthWorld » Thu Nov 08, 2012 5:55 am

In the "Text Formatting" section of the Inspector, see the "margins" property. By default this is set to 4 on each side, but is settable to 0 if you like.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

nlexa
Posts: 26
Joined: Fri Aug 05, 2011 2:34 am

Re: Groups always 8 pixels bigger

Post by nlexa » Sun Nov 11, 2012 10:28 pm

Awesome thank you FourthWorld. Forums always deliver. Why does a group have text formatting options when it doesn't have a text input? What would you use these margins for?

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

Re: Groups always 8 pixels bigger

Post by FourthWorld » Sun Nov 11, 2012 11:39 pm

Technically this isn't a text formatting property per se, but RunRev put that in the same place you'll find the margins property for other object which do contain text.

If you're using a group to visually separate controls, you can get a nice OS-savvy appearance by leaving the defaults in place (4px margin, opaque, 2px border).

And if you want anything custom, those properties are all adjustable.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Post Reply