How to use the "Fit content" of field by coding?

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
alex298
Posts: 101
Joined: Mon May 01, 2006 1:17 pm

How to use the "Fit content" of field by coding?

Post by alex298 » Thu May 08, 2008 7:36 am

Hi,

I noticed that there is a "Fit content" button for field's content under the Size and Position Property window. This is really useful. I wish to use this feature in my coding. However there is no any information related with "Fit content" in the documention.

How can I use the "Fit content" by coding?

Thanks and best regards
Alex
Nice to meet all of you.

alex298
Posts: 101
Joined: Mon May 01, 2006 1:17 pm

Post by alex298 » Thu May 08, 2008 8:17 am

Hi,

I know how to set a "Fit Height" of a field:

Code: Select all

set the height of field "test" to the textHeightSum of field "test"
However I have no any idea how to set a "Fit Width"?

Thanks and best regards
Alex
Nice to meet all of you.

Mark Smith
Posts: 179
Joined: Sat Apr 08, 2006 11:08 pm
Contact:

Post by Mark Smith » Thu May 08, 2008 8:27 am

Alex, have a look at the 'formattedHeight' and 'formattedWidth' properties.

Best,

Mark

Post Reply