padding on fields
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
padding on fields
Hi Guys,
It's probably under my nose but can't seem to find it. I have a field which has the text aligned property set to align right. I have a border around the field and I have typed a number in that field. There seems to be 4mm gap between the edge of the right border of that field and the last digit of my number. Is there anyway I can narrow that gap, Id like it a bit more tighter. I have played around with the margins property for the textfield, but that has not helped much (although it did align the top of my number/text nicely in the middle of the field). Is there a property I have overlooked or is this text field control in particular defined to have 2/3px padding as a minimum around it.
Thanks as always
Jalz
It's probably under my nose but can't seem to find it. I have a field which has the text aligned property set to align right. I have a border around the field and I have typed a number in that field. There seems to be 4mm gap between the edge of the right border of that field and the last digit of my number. Is there anyway I can narrow that gap, Id like it a bit more tighter. I have played around with the margins property for the textfield, but that has not helped much (although it did align the top of my number/text nicely in the middle of the field). Is there a property I have overlooked or is this text field control in particular defined to have 2/3px padding as a minimum around it.
Thanks as always
Jalz
-
- VIP Livecode Opensource Backer
- Posts: 858
- Joined: Wed Jun 24, 2009 1:17 pm
- Contact:
Re: padding on fields
Hi Jalz - you were right to look at margins.
By default a single figure appears in the margins box in the 'Text Formatting' tab of the inspector which means the same value is applied to the left, top, right and bottom margins.
If you want a wider-than-usual right margin you would put something like "4,4,8,4" in the box (as with the values of a rect the order goes clockwise like this: left, top, right, bottom).
Dave
By default a single figure appears in the margins box in the 'Text Formatting' tab of the inspector which means the same value is applied to the left, top, right and bottom margins.
If you want a wider-than-usual right margin you would put something like "4,4,8,4" in the box (as with the values of a rect the order goes clockwise like this: left, top, right, bottom).
Dave
"...this is not the code you are looking for..."
Re: padding on fields
Hi Dave,
I always have to look it up, thanks.
Simon
Maybe I will finally be able to remember rect!...the order goes clockwise like this:...
I always have to look it up, thanks.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: padding on fields
Hi,
you could also set the rightMargin to 8.
When you address the margins by "name" you don't have to worry about the other margins setting.
And if you start off with margins = 4, i.e. all four margins are set to 4 and then issue "set the rightMargin to 8" and look into the inspector for the margins again it will be "4,4,8,4"
Kind regards
Bernd
you could also set the rightMargin to 8.
When you address the margins by "name" you don't have to worry about the other margins setting.
And if you start off with margins = 4, i.e. all four margins are set to 4 and then issue "set the rightMargin to 8" and look into the inspector for the margins again it will be "4,4,8,4"
Kind regards
Bernd
-
- VIP Livecode Opensource Backer
- Posts: 858
- Joined: Wed Jun 24, 2009 1:17 pm
- Contact:
Re: padding on fields
Hi Bernd - you were quite right, I could have just given Jazz a one-liner piece of code - I "SLIPPED UP" there 

"...this is not the code you are looking for..."
Re: padding on fields
Hi Dave,
it actually took me a long time to "find" the different margin names. Up till then I did some complicated things with "the margins", tested for the number of items etc.
That was a pain. I just wanted to spare everybody this.
No wisecracking intended.
Kind regards
Bernd
it actually took me a long time to "find" the different margin names. Up till then I did some complicated things with "the margins", tested for the number of items etc.
That was a pain. I just wanted to spare everybody this.
No wisecracking intended.
Kind regards
Bernd
Re: padding on fields
Thank you all, you're all lot simply brilliant 
