Page 1 of 1

fit content by script - solved

Posted: Thu May 24, 2012 3:18 am
by Christo777
Hello,

I need to resize a field according to it's contained text (which I don't know in advance), so all text will be visible without scrollbars. More or less like inspector's "Fit content" in "Size & position".

Thank you

Re: fit content by script

Posted: Thu May 24, 2012 3:34 am
by sturgis
look at formattedwidth and formattedheight in the dictionary.

set the width of field "myfield" to the formattedwidth of field "myfield" ...

Re: fit content by script

Posted: Fri May 25, 2012 12:07 am
by Christo777
Thank you, It did work this time.