Spacing between lines on buttons
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Spacing between lines on buttons
Oh wait, I think I misunderstood what you were asking for heh. I interpreted 'center vertically' to mean one word below the other in vertical alignment
However, you can still center it, no matter how large the text field, by adjusting the margins, although that might take some experimentation (plugging numbers in).
However, you can still center it, no matter how large the text field, by adjusting the margins, although that might take some experimentation (plugging numbers in).
Re: Spacing between lines on buttons
Hi Bogs
Yes, I agree. If the size of the control is fixed and the number of lines of text content is fixed, then the Property Inspector is an easy way to vertically centre the text in a field.
The advantage that buttons have is that they automatically vertically centre their labels without these two conditions needing to be true. But, as people have said in the earlier replies to this post, button labels don't support some of the other (very useful) text formatting features that Fields have.
Thanks (all) for your fast / comprehensive input
Kim
Yes, I agree. If the size of the control is fixed and the number of lines of text content is fixed, then the Property Inspector is an easy way to vertically centre the text in a field.
The advantage that buttons have is that they automatically vertically centre their labels without these two conditions needing to be true. But, as people have said in the earlier replies to this post, button labels don't support some of the other (very useful) text formatting features that Fields have.
Thanks (all) for your fast / comprehensive input
Kim
Re: Spacing between lines on buttons
Agreed, but far as I know, you have to write multi line labels through code, like your "Hello" & cr & "World" line, at least here I wasn't able to do that in the label box in the PI, where as you could just enter the text in the contents box of a field.
I'd still run with the kludge I mentioned above, if I needed a particular look for some odd reason
-
- VIP Livecode Opensource Backer
- Posts: 9648
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Spacing between lines on buttons
The label field in the inspector is multi-line. But it is a little odd.
If you simply enter some text, a return and some more text, it does not, at least in 8.1.8, show that multi-line feature until you change panes and go back, even though the button label shows it instantly. And if you set externally, the inspector will not update until that pane is reloaded.
This is likely a very minor bug.
Craig
If you simply enter some text, a return and some more text, it does not, at least in 8.1.8, show that multi-line feature until you change panes and go back, even though the button label shows it instantly. And if you set externally, the inspector will not update until that pane is reloaded.
This is likely a very minor bug.
Craig
Re: Spacing between lines on buttons
Sorry, I should have posted a picture. When I said
I was talking about this label box in the PI, not a label object where your filling in the contents
As far as I know, to make a multi line button label, you have to do that through code. I'd be happy to stand corrected though
-
- VIP Livecode Opensource Backer
- Posts: 9648
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Spacing between lines on buttons
Bogs.
Make a new button. Make it a bit larger.
Type "Hello & return & "World" into the label field in the inspector.
Watch the button. And if you carefully watch the label field, you will get a clue as to the fact that this is indeed working.
Open any other tab in the inspector, like the custom prop tab.
Open the main tab again. You now see a multi-line label field. And it now sticks.
Craig
Make a new button. Make it a bit larger.
Type "Hello & return & "World" into the label field in the inspector.
Watch the button. And if you carefully watch the label field, you will get a clue as to the fact that this is indeed working.
Open any other tab in the inspector, like the custom prop tab.
Open the main tab again. You now see a multi-line label field. And it now sticks.
Craig
Re: Spacing between lines on buttons
Well, it doesn't seem to work that way here (on Linux or on Windows), unless I am taking you too literally.
But, I think I did finally figure out a couple of things.
- my initial tests were done in much earlier versions which (apparently) don't have multiline button labels in the PI, but you can do through code, and
- in the versions it *does* work on, just hitting the enter key puts it on the next line
-
- VIP Livecode Opensource Backer
- Posts: 9648
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Spacing between lines on buttons
Hmmm.
The recipe I laid out works on Mac OS 10.9, LC 8.1.8.
It is just a funny redraw glitch in the PI. The button itself reacts as soon as the entry is terminated, usually by just clicking somewhere or changing panes.
Anyway, a minor oddity; the label field supports multi-line.
But Bogs, your PI shows the expected multi-Line field. So in Linux and Windows there is NOT that glitch?
Craig
The recipe I laid out works on Mac OS 10.9, LC 8.1.8.
It is just a funny redraw glitch in the PI. The button itself reacts as soon as the entry is terminated, usually by just clicking somewhere or changing panes.
Anyway, a minor oddity; the label field supports multi-line.
But Bogs, your PI shows the expected multi-Line field. So in Linux and Windows there is NOT that glitch?
Craig
Re: Spacing between lines on buttons
In windows there is not the glitch, in Linux you only see a single line.
Re: Spacing between lines on buttons
I finally had a chance to test on Mac OSX 10.6.6 (highest I can do) and Lc 8.1.8. I still think I somehow took the original formula too literally. As soon as I tabbed out of the label field, just as on windows and linux, this updated the button without switching tabs on the PI
When put in this way, tabbing out, switching tabs in the PI, nothing changed the result.