Monday, December 13, 2010

Auto Resizable TextInput and TextArea Controls in flex 4

In Flex 3 there some custom resizable controls available for TextInput and TextArea.
Here are some links:


http://tush.wordpress.com/2008/11/20/flex-3-auto-resize-textinput-control-how/


http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&extid=1034866

http://tsvayer.blogspot.com/2009/12/auto-resizable-textinput-and-textarea.html

As in Flex 4 we more depend on skining (and its damn easy to implement) I tried it in twisting the skin of the spark TextInput. In the Custom skin class find the
RichEditableText component with id "textDisplay" and modify widthInChars property to "NaN".

For spark TextArea in skin class remove the scroller used to add scroll bar and then update heightInLines property to "NaN".
Now we have two new auto resizable custom components....

Thats the power of flex 4..