-
2 Dec 2011 11:16 AM #1
Unanswered: Limit TextArea field Rows and Cols
Unanswered: Limit TextArea field Rows and Cols
Is there any way to limit the TextArea by cols and rows?
This post has something along the lines of what I'm looking for, but doesn't appear to be a valid function in Sencha Touch.
http://www.sencha.com/forum/showthre...ws-in-textarea
Is anyone aware of how you would limit the rows and columns?
Martin
-
2 Dec 2011 11:20 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,656
- Vote Rating
- 435
- Answers
- 3108
There is a maxRows config on the TextArea field that will set the rows attribute to the textarea... for the cols, you will have to update the renderTpl:
See what happens with that. Never messed with this... usually let the form do the sizing and I haven't had to limit the TextArea.Code:renderTpl: [ '<tpl if="label"><div class="x-form-label"><span>{label}</span></div></tpl>', '<tpl if="fieldEl"><div class="x-form-field-container">', '<textarea id="{inputId}" type="{type}" name="{name}" class="{fieldCls}"', '<tpl if="tabIndex">tabIndex="{tabIndex}" </tpl>', '<tpl if="placeHolder">placeholder="{placeHolder}" </tpl>', '<tpl if="style">style="{style}" </tpl>', '<tpl if="maxRows != undefined">rows="{maxRows}" </tpl>', '<tpl if="maxCols != undefined">cols="{maxCols}" </tpl>', '<tpl if="maxlength">maxlength="{maxlength}" </tpl>', '<tpl if="autoComplete">autocomplete="{autoComplete}" </tpl>', '<tpl if="autoCapitalize">autocapitalize="{autoCapitalize}" </tpl>', '<tpl if="autoFocus">autofocus="{autoFocus}" </tpl>', '></textarea>', '<tpl if="useMask"><div class="x-field-mask"></div></tpl>', '</div></tpl>' ]Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.


Reply With Quote