Adjusting the size of a field to fit the text inside

Sarah Reichelt sarahr at genesearch.com.au
Thu Jan 3 22:18:01 EST 2002


Try this in a button script:

on mouseUp
  set the height of fld "MyField" to the formattedHeight of fld "MyField"
  set the width of fld "MyField" to the formattedWidth of fld "MyField"
end mouseUp  

Sarah

P.S. All the rev palettes are scripted, so if you see one of them do
something nifty, turn on "Revolution UI Stacks in Lists" and browse through
them in the Application View. You can examine all the scripts & properties
that way.

> 
> Is it possible to adjust the size of a field to fit the text, using a
> script? I know it is possible with the nifty little buttons on the
> properties palette, but can it be done by a script as well?
> 
> Terry
> 
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
> 




More information about the use-livecode mailing list