"Fit Content" button in property palette

Jan Schenkel janschenkel at yahoo.com
Fri Jun 11 07:36:01 EDT 2004


--- Ian Summerfield wrote:
> On the property inspector palette their are buttons
> to make a field 
> "fit content".  This is exactly what I want to do
> when a user enters 
> some text into a field.  I can't find out how to do
> it though!  How do 
> I "borrow" the script behind those buttons on the
> property inspector?  
> Or is it a property of a field to change?
> 

Hi Ian,

The "Fit content" button basically sets the width of
the selected object to its formattedWidth (or the
height to the formattedHeight).
Here's how to resize a field width and height to fit
the content :
--
  set the width of field "foobar" to \
      the formattedWidth of field "foobar" 
  set the height of field "foobar" to \
      the formattedHeight of field "foobar" 
--

Hope this helped,

Jan Schenkel.

=====
"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)


	
		
__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 


More information about the use-livecode mailing list