[Dojo-interest] how to set minimum Heigth in dijit.form.Textarea in TableContainer

Remy Damour remy.damour at gmail.com
Thu Jul 2 04:18:38 EDT 2009


I've just tested it right now, and it looks like 'height' has no
effect, but 'min-height' does the trick.
Great news.

2009/7/2 V S P <toreason at fastmail.fm>:
>
> Thank you.
>
> I sofar used styling (I am using 1.3.1 trunk) and it seemed to expand
>
> (sofar I tested on FF 3.0 browser), so I may have to use your trick if
> this does not
> work everywhere
>
> style="overflow:auto;
>                  position:relative; width: 95%; height: 50px; min-height:50px;
>                  vertical-align:top;"
>
>
>
>
>
>
>
>
>
> On Thu, 02 Jul 2009 05:20 +0200, "Remy Damour" <remy.damour at gmail.com>
> wrote:
>> 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 at fastmail.fm> wrote:
>> >
>> > I am using textarea within TableContainer
>> >
>> > and no matter what I try, the text area comes out
>> > to be very think 'bar' and only gets larger if I type in inside
>> >
>> > It has to be at least a column of rows wide, so that the user knows
>> > where to type in.
>> >
>> > Why does the below not change at least to be minimum heigth of some
>> > sort?
>> >
>> >
>> >
>> > <span dojoType="dojox.layout.TableContainer" cols="1"
>> > id="ID_Service_FLDS_CMD"
>> >                        customClass="greyLNF" style="border: 1px solid black;width: 100%;">
>> >                  <div id=ID_txt_start title="at Start Text:"  style="width:50%; heigth:15em;"
>> >
>> >                  dojoType="dijit.form.Textarea"></div>
>> > </span>
>> >
>> >
>> > thank you
>> > --
>> > Vlad P
>> > author of C++  ORM  http://github.com/vladp/CppOrm/tree/master
>> >
>> >
>> > --
>> > http://www.fastmail.fm - The way an email service should be
>> >
>> > _______________________________________________
>> > FAQ: http://dojotoolkit.org/support/faq
>> > Book: http://dojotoolkit.org/docs/book
>> > Forums: http://dojotoolkit.org/forum
>> > Dojo-interest at mail.dojotoolkit.org
>> > http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
>> >
>> _______________________________________________
>> FAQ: http://dojotoolkit.org/support/faq
>> Book: http://dojotoolkit.org/docs/book
>> Forums: http://dojotoolkit.org/forum
>> Dojo-interest at mail.dojotoolkit.org
>> http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
> --
> Vlad P
> author of C++  ORM  http://github.com/vladp/CppOrm/tree/master
>
>
> --
> http://www.fastmail.fm - The professional email service
>
> _______________________________________________
> FAQ: http://dojotoolkit.org/support/faq
> Book: http://dojotoolkit.org/docs/book
> Forums: http://dojotoolkit.org/forum
> Dojo-interest at mail.dojotoolkit.org
> http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
>


More information about the Dojo-interest mailing list