Ticket #3450 (closed defect: fixed)
StackContainer/TabContainer: support non-fixed sized
| Reported by: | bill | Owned by: | bill |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.2 |
| Component: | Dijit | Version: | 0.9 |
| Severity: | normal | Keywords: | |
| Cc: | alex |
Description (last modified by bill) (diff)
The doLayout flag from 0.4 days is broken, and needs to be fixed...
StackContainer? has a doLayout flag that you use to make the height of each pane equal. Example #1:
<div dojoType="dijit.layout.StackContainer" style="height: 300px;"
doLayout=true>
<div dojoType=...> short content </div>
<div dojoType=...> long content </div>
</div>
When the above widget is displayed, regardless of which child is being shown, it will be 300px tall. There will be a scrollbar if necessary, or added whitepace to extend the short content to 300px.
Example #2:
<div dojoType="dijit.layout.StackContainer" doLayout=false> <div dojoType=...> short content </div> <div dojoType=...> long content </div> </div>
When the above widget is displayed, it will change height depending on which child is being shown. All it basically does is show one div and hide the others.
As a bonus, maybe we could detect if the user wanted layout automatically, rather than needing a doLayout flag. Seems like we could detect if the user wanted us to adjust heights by whether or not height was set explicitly on the StackContainer? widget. The problem is that the height may be set explicitly, but indirectly, via CSS:
<style>
#foo { height: 300px; }
</style>
<div dojoType="dijit.layout.StackContainer" id=foo >
<div dojoType=...> short content </div>
<div dojoType=...> long content </div>
</div>