[Dojo-interest] form over-run

John Brinnand jbrinnand.dojo at gmail.com
Mon Nov 16 20:35:34 EST 2009


Hi Peter,

Okay - elaboration: I am adding a form (dijit.form.Form) to the content
pane. Within this form is a table which holds the widgets. It is much like
the Form in dojo tests:
http://archive.dojotoolkit.org/dojo-2009-11-16/dojotoolkit/dijit/tests/form/Form.html.
And it is laid out in much the same way.

So - form widgets (textbox, textarea, editor, color-palette, checkboxes,
etc) are then added programmatically to the form. And as the form widgets
are added to the form, the form dynamically grows to accept the widgets.
However at some point the Form will exceed the height of its parent content
pane. In this instance the content pane neither resizes (which I don't
expect it should do) or display a scrollbar (which it used to do). I am not
sure if it's something that got messed up in my code. Hence my question on
what causes the scrollbar to appear. I read something in the forum to the
effect that the content pane's height must be set to something other than
auto and the overflow property must be set to auto. And so was wondering if
this contributed to the problem.

Anyway - I will look into it and provide a test to show what I mean.

Regards,

John

On Mon, Nov 16, 2009 at 2:08 PM, Peter E Higgins <dante at dojotoolkit.org>wrote:

> Hi John,
>
> Could you elaborate? There isn't enough information here to answer
> anything. I've made up a simple test case which I _think_ reproduces
> this, but it doesn't really break as you described. Some sample
> code/reduced test case would be great, thanks.
>
> Regards,
> Peter
>
> test:
>
> <!DOCTYPE html>
> <html>
>    <head>
>
>        <link rel="stylesheet" href="dijit/themes/tundra/tundra.css">
>
>        <script src="dojo/dojo.js"></script>
>        <script>
>            dojo.require("dijit.layout.ContentPane");
>            dojo.require("dijit.form.TextBox");
>            dojo.addOnLoad(function(){
>
>                var cp = new dijit.layout.ContentPane({
>                    style:"height:200px; width:400px; overflow:auto"
>                }).placeAt(dojo.body());
>
>                var intev = setInterval(function(){
>
>                    new dijit.form.TextBox({}).placeAt(cp.containerNode);
>                    dojo.place("<br>", cp.containerNode);
>
>                }, 100);
>
>                setTimeout(function(){
>                    clearTimeout(intev);
>                }, 20000);
>            });
>
>        </script>
>
>    </head>
>    <body class="tundra">
>    </body>
> </html>
>
> John Brinnand wrote:
> > Hi All,
> >
> > I am using 1.4b2. When form widgets are added to a form
> > asynchronously, the form will automatically grow to accommodate the
> > added  widgets. However - the growing form can exceed the boundaries
> > of it's parent - in this case a content pane. When this happens the
> > scrollbar (which used to appear in 1.3.2) does not appear and the form
> > simply overruns it's parents boundaries.
> >
> > I have  tried setting the property overflow to auto (overflow:auto),
> > but it does not work. Note that the containing node - a content pane -
> > has it's height set to auto. Does this contribute to the problem?
> >
> > Thanks in advance for any help,
> >
> > John
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > FAQ: http://dojotoolkit.org/support/faq
> > Book: http://docs.dojocampus.org
> > Dojo-interest at mail.dojotoolkit.org
> > http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
> >
>
>
> --
> Peter E Higgins
> Dojo Project Lead : http://dojotoolkit.org
>
> _______________________________________________
> FAQ: http://dojotoolkit.org/support/faq
> Book: http://docs.dojocampus.org
> Dojo-interest at mail.dojotoolkit.org
> http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.dojotoolkit.org/pipermail/dojo-interest/attachments/20091116/6e836c26/attachment.htm 


More information about the Dojo-interest mailing list