how to set minimum Heigth in dijit.form.Textarea in TableContainer

View: New views
2 Messages — Rating Filter:   Alert me  

how to set minimum Heigth in dijit.form.Textarea in TableContainer

by V S P :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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@...
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest

Re: how to set minimum Heigth in dijit.form.Textarea in TableContainer

by Remy Damour-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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:

>
> 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@...
> 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@...
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest