Page 1 of 1
Quick Button Label Question
Posted: Mon Dec 09, 2013 10:33 pm
by Gage
Hello!
I have a button with a long label. For the text size I want, the label is too wide for the width of the button I want.
Is there a way to wrap the text of the label onto two lines? It would fit vertically on the button, and then would also fit horizontally.
I realize I could create a group and position a field in front of the button, but I was wondering if there was a property I could set that would allow me to wrap the label onto two lines or include a carriage return to separate it between words.
Thanks very much!
Phil E.
Re: Quick Button Question
Posted: Mon Dec 09, 2013 10:41 pm
by Mark
Hi Phil,
You can write a text on multiple lines in a field, copy the text and paste the text in the label field in the properties inspector of your button. Make sure to paste the text in the label field and not in the name field on the properties inspector.
Kind regards,
Mark
Re: Quick Button Question
Posted: Mon Dec 09, 2013 10:42 pm
by Gage
Mark,
Beautiful! That is perfect.
Thank you so much, and have a wonderful week!
Cheers,
Phil E.
Re: Quick Button Question
Posted: Tue Dec 10, 2013 12:20 am
by Klaus
Hi Phil,
you can directly enter multiline text in the LABEL field of the inspector!
The trick is to use "newline" code: BACKSLASH & n -> \n instead of a RETURN!
Example:
This is line 1\nand this is line 2
Gives:
This is line 1
and this is line 2
Obviously Livecode applies a FORMAT to the content of that field before actually setting the LABEL.
Best
Klaus
Re: Quick Button Question
Posted: Tue Dec 10, 2013 12:22 am
by Gage
Klaus,
Wow, that is also amazing information! Thank you for pitching in. Makes perfect sense!
I hope others are able to find this useful, also!
Cheers,
Phil E.
Re: Quick Button Label Question
Posted: Tue Dec 10, 2013 12:40 am
by Mark
Hi Klaus,
I didn't know about it. It isn't in the dictionary. It is quite useful.
Apparently, it works if you can type the backslash without having to use Alt Gr. or Str (the Alt key to the right of the space bar). If you need to use that key in the properties inspector, the field currently being edited will be reset to its original content.
Kind regards,
Mark
Re: Quick Button Label Question
Posted: Tue Dec 10, 2013 1:11 pm
by Klaus
Hi Mark,
Mark wrote:I didn't know about it. It isn't in the dictionary. It is quite useful.
I knew this from my old MetaCard days and was delighted, that it still works in LC
Best
Klaus