Hi,
I believe this is the same issue I had. I wanted the textarea to be
larger than a singleRow but still have the expandability feature.
I did not find a native option on djit.form.Textarea (too bad because
textarea looks like a simple <input type="text"> now and user has no
idea it can enter more than one line).
So I subclassed textarea widget to add a simple 'skipResizeUponCreate'
option. When it's true, textarea does not resize upon create but still
resize upon writting (giving the best of both worlds).
Below is the code.
I hope it helps,
Remy
/*
* Extends dijit.form.textarea to conditionally prevent height
resizing upon instanciation
*/
dojo.provide('fenv.widgets.Textarea');
dojo.require('dijit.form.Textarea');
dojo.declare(
'fenv.widgets.Textarea',
dijit.form.Textarea,
{
skipResizeUponCreate: null,
_rdFirstCall: true,
resize: function(){
// summary:
// skip call of parent resize() if called upon creation and
this.skipResizeUponCreate is true
if (!this._rdFirstCall || !this.skipResizeUponCreate) {
this._rdFirstCall = false;
return this.inherited(arguments);
}
}
}
);
On Thu, Jul 2, 2009 at 6:01 AM, V S P<
toreason@...> wrote:
_______________________________________________
FAQ:
http://dojotoolkit.org/support/faqBook:
http://dojotoolkit.org/docs/bookForums:
http://dojotoolkit.org/forumDojo-interest@...
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest