My Stupid code 2

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: heatherlaine, Klaus, FourthWorld, kevinmiller

Post Reply
MaxV
Posts: 1506
Joined: Tue May 28, 2013 2:20 pm
Location: Italy
Contact:

My Stupid code 2

Post by MaxV » Mon May 07, 2018 6:07 pm

Hi,
another problem that I solved wasting a lot of cycles, do you have a better one?
I need to use the bigger font available to fit all the text inside the field.

Code: Select all

put true into ttt
put 1 into t2
repeat while ttt
      add 1 to t2
      set the textsize of field "presentazione" to t2
      if the formattedheight of field "presentazione" > the height of field "presentazione" then
         put false into ttt
         set textsize of field "presentazione" to (t2 - 1)
      end if
 end repeat
Livecode Wiki: http://livecode.wikia.com
My blog: http://livecodeitalia.blogspot.it
To post code use this: http://tinyurl.com/ogp6d5w

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”