Label - Fit Content

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller

Post Reply
Posts: 7
Joined: Mon Nov 08, 2010 6:09 pm

Label - Fit Content

Post by noelf » Thu Feb 05, 2015 4:02 pm

I see where you can have a field "fit content" in the object inspector.

I would like to do this while running, and I can't seem to find an equivalent command. I'm sure I'm missing something easy :)

- Noel

Posts: 12008
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany

Re: Label - Fit Content

Post by Klaus » Thu Feb 05, 2015 4:28 pm

Hi noel,

not sure, but I think LC uses something like this in that button:
## Example to fit a button "xyz" to its loooooong label
lock screen
set the width of btn "xyz" to the formattedwidth of btn "xyz"
set the height of btn "xyz" to the formattedheight of btn "xyz"
unlock screen



Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”