Resizing A Label Field.

Deploying to Windows? Utilizing VB Script execution? This is the place to ask Windows-specific questions.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Googie85
Posts: 216
Joined: Tue Aug 05, 2014 10:07 am

Resizing A Label Field.

Post by Googie85 » Tue Dec 21, 2021 3:53 am

Hi Guys!

I am trying to resize a label field based on the number of lines of text it contains. If I was to add a new line to a label field, how would I resize the height of the selected field?

Thanks for your replies!!!!

Googie.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10013
Joined: Wed May 06, 2009 2:28 pm

Re: Resizing A Label Field.

Post by dunbarx » Tue Dec 21, 2021 7:00 am

Hi.

There is a very cool bunch of properties that contains the word "formatted". Check the dictionary. In your case, after you have loaded your label field with whatever text,

Code: Select all

set the height of field yourLabelField to the formattedHeight of field yourLabelField
Craig

Post Reply

Return to “Windows”