-
23 Jan 2012 10:05 AM #1
Answered: How do i get a TextAreaField to AutoSize?
Answered: How do i get a TextAreaField to AutoSize?
I need my TextAreaFields to resize the height based on the content. Everything i do is not very consistent, should it do this by default? I have a fair amount of css and code trying to fix this that i fear i might have broken it.
Is there a good/easy way to get this to work on the phone?
-
Best Answer Posted by bvkimball
Ok, So i put the following in my updateValue function:
This works for my purpose which is loading data and building a form. I might need to add it to an onkeydown listener when i am doing editing.Code:component.input.setHeight(component.input.dom.scrollHeight);
I hope this helps others.
-
23 Jan 2012 10:31 AM #2
Unfortunately there is no easy way to do this, and it is not done by the frame work. You would need to listen to the keyup event and calculate the size of the text (ewh) and then resize it from that.
Yup, it sucks.Sencha Inc.
Robert Dougan - @rdougan
Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.
-
23 Jan 2012 11:51 AM #3
Ok, So i put the following in my updateValue function:
This works for my purpose which is loading data and building a form. I might need to add it to an onkeydown listener when i am doing editing.Code:component.input.setHeight(component.input.dom.scrollHeight);
I hope this helps others.


Reply With Quote