Spacing between lines on buttons
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Spacing between lines on buttons
Hi to all. I'm just getting back into LC after a years break.
I'm stuck on the simplest of things. If I have a button with the label - "Hello & return & "World", how do I reduce the (very generous) amount of white spec between the two lines of the label?
I think that if it was a field then I could use textHeight, but textHeight doesn't seem to work on buttons.
Thanks in advance.
Kim
I'm stuck on the simplest of things. If I have a button with the label - "Hello & return & "World", how do I reduce the (very generous) amount of white spec between the two lines of the label?
I think that if it was a field then I could use textHeight, but textHeight doesn't seem to work on buttons.
Thanks in advance.
Kim
-
- VIP Livecode Opensource Backer
- Posts: 9823
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Spacing between lines on buttons
Good to see you back here, Kim.
AFAIK button leading is based on OS text specs, and we don't currently have a property to adjust it.
Any chance you could use a field for that?
AFAIK button leading is based on OS text specs, and we don't currently have a property to adjust it.
Any chance you could use a field for that?
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: Spacing between lines on buttons
Or use a button below, and a label set to transparent on top of the button, then pass, or send, the labels mouse event to the button.
Of course, this is a kludge way to do it
-
- VIP Livecode Opensource Backer
- Posts: 9648
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Spacing between lines on buttons
No.
Set the fixedLineHeight of the button and then set the textHeight to the value of your choice.
You can get as tight as you need.
Craig Newman
Set the fixedLineHeight of the button and then set the textHeight to the value of your choice.
You can get as tight as you need.
Craig Newman
-
- VIP Livecode Opensource Backer
- Posts: 9823
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Spacing between lines on buttons
fixedLineHeight works with buttons?
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: Spacing between lines on buttons
No, but in earlier versions of Lc, Craig's textHeight line would have been the resolution. Unfortunately, I didn't notice it making any change here in 8.x, which is what I used to test this problem on the assumption that the Op was using a newer version.
-
- VIP Livecode Opensource Backer
- Posts: 9648
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Spacing between lines on buttons
No.
Bogs comment about earlier versions of LC notwithstanding:
I just saw "label" in the opening post and went and got a label field. Not a, er, label button.
Craig
Bogs comment about earlier versions of LC notwithstanding:
I just saw "label" in the opening post and went and got a label field. Not a, er, label button.
Craig
Re: Spacing between lines on buttons
Perhaps I phrased that poorly, but I'll show you what I am talking about.
Here is the code running in Lc9. Mind you, this is a linux environment not officially supported, your mileage may vary: Change text height - no discernible difference. However, switching out to an earlier version of Lc, in this case, 6.7.11 shows it correctly... Change text height - big difference.
So, whether you will see it in Lc 8/9 or not may well depend on which Os you are running on, here it was bupkiss.
-
- 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.
I think this is worth mentioning to the team. There should be no good reason not to restore a feature that we once had, and hopefully no great difficulty in doing so And we see that at least one user would like to use it.
Craig
I think this is worth mentioning to the team. There should be no good reason not to restore a feature that we once had, and hopefully no great difficulty in doing so And we see that at least one user would like to use it.
Craig
Last edited by dunbarx on Wed Apr 18, 2018 10:18 pm, edited 1 time in total.
Re: Spacing between lines on buttons
I agree with everything you said Craig, unfortunately every time I submit a bug report, I'm told (in not so many words ) that I use a non supported version of the Linux Os. Curious though, you use a Mac if I remember correctly, does it work on there? The term and feature appear to still be in the dictionary, so I am guessing it means the feature is still "in there" as it were.
*Edit - never mind, I keep forgetting to pop open my own osx vm, it doesn't work there either. Will submit the bug report.
*Edit 2- It was already reported, apparently, after 8.0 GM was released,Bug 19201.
*Edit 3- Added comment saying issue still active up to Lc 9.0.
*Edit - never mind, I keep forgetting to pop open my own osx vm, it doesn't work there either. Will submit the bug report.
*Edit 2- It was already reported, apparently, after 8.0 GM was released,Bug 19201.
*Edit 3- Added comment saying issue still active up to Lc 9.0.
-
- 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.
Yep checks out.
And you know, I went back just a little bit, since I am relatively new in v8, being stubborn you know, in spite of Jacque's exhortations, and found that I also set the textHeight of a button in v.6. So I was not so chagrined when I assumed it was simple to do, even though I popped out a field when clearly a button was being discussed.
So,
Craig
Yep checks out.
And you know, I went back just a little bit, since I am relatively new in v8, being stubborn you know, in spite of Jacque's exhortations, and found that I also set the textHeight of a button in v.6. So I was not so chagrined when I assumed it was simple to do, even though I popped out a field when clearly a button was being discussed.
So,
Craig
Re: Spacing between lines on buttons
I got some of that kind of mule myself my friend, I found it worked all the way back to rev 2.2.1 at least, so you have every reason to have assumed it would still work now I think I did find that the last time it did *not* work that way was in Mc 2.5, before it went Oss.
Re: Spacing between lines on buttons
Thanks Richard, Bogs & Craig
I was using a button instead of a field because buttons gave me zero-script vertical centering of text. A great feature! But I can see that my work-around has created a different set of problems, so I will switch back to using fields. Unfortunately, I've also got a problem with fields; but I'll post that as a different topic.
Regards
Kim
I was using a button instead of a field because buttons gave me zero-script vertical centering of text. A great feature! But I can see that my work-around has created a different set of problems, so I will switch back to using fields. Unfortunately, I've also got a problem with fields; but I'll post that as a different topic.
Regards
Kim
Re: Spacing between lines on buttons
Thanks Bogs. Please let it be true It's possibly an issue of definitions. I've spotted lots of discussion on this forum, going back to 2007, on how to vertically centre text in a field; but I was under the impression that there was not a Property Inspector solution to this. You can use the Property Inspector > Text Tab to horizontally centre the text in a field.