Resizing a Text Field
Scott Rossi
scott at tactilemedia.com
Tue Aug 28 01:42:55 EDT 2012
Maybe something like this:
on mouseUp
put the topLeft of fld "myField" into TL
put the formattedRect of line 1 to -1 of fld "myField" into theRect
put the margins of fld "myField" into M
if number of items of M = 1 then put M,M into M
subtract item 1 of M from item 1 of theRect
subtract item 2 of M from item 2 of theRect
set rect of fld "myField" to theRect
set topLeft of fld "myField" to TL
end mouseUp
Regards,
Scott Rossi
Creative Director
Tactile Media, UX Design
Recently, Peter Bogdanoff wrote:
> Hi,
> Does anyone have a quick and dirty script for resizing a field to fit text
> content?
>
> Peter Bogdanoff
> UCLA
More information about the use-livecode
mailing list