How do I wrap long button names?

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
mluka
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 73
Joined: Sun Jun 17, 2007 12:08 am

How do I wrap long button names?

Post by mluka » Tue Jun 26, 2007 12:47 am

Hi, all.

I'm sure this is a very basic question but I can't seem to find the answer in the docs or the forum:

I need some buttons with names that are fairly long (2-3 words). The buttons have to be squarish in shape, not elongated. How do I get the button name (or label?) to wrap and use the full height of the button???

Thanks!
Michel
Montréal, Canada

kpeters
Posts: 112
Joined: Wed Mar 21, 2007 9:32 pm

Post by kpeters » Tue Jun 26, 2007 4:16 am

Hi Michel ~

one way would be:

set the label of button "test" to "This is a very" & CR & "verbose caption"

Regards,
Kai

xApple
Posts: 113
Joined: Wed Nov 29, 2006 10:21 pm

Post by xApple » Tue Jun 26, 2007 1:57 pm

You can even do it from the inspector interface:
What I usually do is type the long button name I want in the tooltip field (which is a bit larger) and then cut&paste it to the button name field.

Cheers.

mluka
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 73
Joined: Sun Jun 17, 2007 12:08 am

Multi-line button names

Post by mluka » Wed Jun 27, 2007 2:34 am

Thanks for two excellent suggestions.

I did notice a weird (?) behaviour in testing out these suggestions: if I use the tooltip area to prepare the text (say two words on two separate lines) and then copy and paste this text into the label area, everything works fine.

However, if I cut and paste into the name area, then what I get is this: word1_word2!

Weird, non?

But thanks again for the suggestions. They answer my question.
Michel
Montréal, Canada

kpeters
Posts: 112
Joined: Wed Mar 21, 2007 9:32 pm

Post by kpeters » Fri Jun 29, 2007 7:21 am

Not weird - control names may not contain control characters such as carriage returns or linefeeds.

So it looks as if Revolutions replaces these illegal characters with legal ones...

HTH,
Kai

Post Reply