PDA

View Full Version : Autosize for Textfields



next
3 Apr 2007, 12:53 AM
Will the autosize feature for Textfields be supported in a future version (like in old "InlineEditor"). I use the InlineEditor class a lot and want to move away from legacy code.

Looking through the code I saw that Textarea has an autosize option. Is there a reason to skip this feature in Textfields?

jack.slocum
3 Apr 2007, 3:32 AM
You mean I wasn't the only one who liked that feature? ;)

I will look at the code and let you know when it will be back in.

jack.slocum
3 Apr 2007, 5:34 AM
This is in SVN. The TextField class now supports a grow config option like TextArea. Related config values are growMin, growMax.

This is accomplished through a new class Ext.util.TextMetrics, which allows for generically measuring the size an element would be if updated with the specified text or some HTML. It supports measuring size (auto width and height), width only and height only (requires a fixed width).

Let me know if you have any problems.