#19021 closed defect (invalid)
dijit/layout/ContentPane does not resize when adding widgets as children
Reported by: | GibboK | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | tbd |
Component: | Dijit | Version: | 1.12.2 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Steps to reproduce issue:
- Open test case at https://jsfiddle.net/gibbok/wy5df86v/
- Click 10 times button "Click me many times!".
Issue:
dijit/layout/ContentPane
does not resize when adding widgets as children.- Content inserted is not fully visible.
- There is no option to show or not a scrollbar.
Desired behavior:
- Dimensions for
dijit/layout/ContentPane
should increase in order to accommodate new added widgets. All inner widgets should be visible. - Would be nice to have an option to show/hide scrollbar programmatically.
Change History (4)
comment:2 Changed 5 years ago by
Component: | General → Dijit |
---|---|
Resolution: | → invalid |
Status: | new → closed |
The ContentPane? isn't changing size because you explicitly set the size to 125px.
As for the scrollbar, that's controlled via the CSS overflow
property.
comment:3 Changed 5 years ago by
Thanks for your comment, unfortunately the problem persists even after removing height of 125px.
Live example https://jsfiddle.net/wy5df86v/5/
A related question/answer on SO:
Please consider re-open this ticket.
require(["dijit/layout/ContentPane", "dijit/TitlePane", "dijit/form/Button", "dojo/domReady!"], function(ContentPane, TitlePane, Button) { this._contentPanel = new ContentPane({ style: "background-color:red;" }, "contentPanel"); this._titlePanel = new TitlePane({ title: "I'm a TitlePane", content: "Collapse me!" }, "titlePanel"); this._button = new Button({ label: "Click me many times!", onClick: function() { this._titlePanel.addChild(new Button({ label: "Test", style: "width: 250px" })); }.bind(this) }, "button"); this._contentPanel.addChild(this._titlePanel); this._titlePanel.addChild(this._button); this._contentPanel.startup(); });
comment:4 Changed 5 years ago by
Ah.... yes, it's the TitlePane? that has a fixed height but I guess that's set by the ContentPane?. I think you just need to set the ContentPane?'s doLayout
flag to false.
Note: See
TracTickets for help on using
tickets.