Opened 14 years ago

Last modified 13 years ago

#3450 closed defect

StackContainer/TabContainer: support non-fixed sized — at Version 6

Reported by: bill Owned by: Adam Peller
Priority: high Milestone: 1.2
Component: Dijit Version: 0.9
Keywords: Cc: alex
Blocked By: Blocking:

Description (last modified by bill)

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>

Change History (6)

comment:1 Changed 14 years ago by Adam Peller

Summary: PageContainer: remove doLayout flagStackContainer: remove doLayout flag

comment:2 Changed 14 years ago by Adam Peller

see #4019

comment:3 Changed 14 years ago by bill

Description: modified (diff)

comment:4 Changed 14 years ago by bill

Description: modified (diff)

comment:5 Changed 14 years ago by Adam Peller

Milestone: 1.01.1
Priority: normalhigh

comment:6 Changed 14 years ago by bill

Description: modified (diff)
Summary: StackContainer: remove doLayout flagStackContainer/TabContainer: support non-fixed sized
Note: See TracTickets for help on using tickets.