Dojo StackContainer children are not resizing on browser maximise/restore
Posted
by Andy
on Stack Overflow
See other posts from Stack Overflow
or by Andy
Published on 2010-05-25T11:51:18Z
Indexed on
2010/05/26
8:11 UTC
Read the original article
Hit count: 249
Hi. I have the following nested layout in a dojo 1.4 app:
BorderContainer 1
--> Stack Container 1
-->-->BorderContainer 2
-->-->BorderContainer 3
The StackContainer is sized with width and height 100%. When I resize the browser window using maximise/restore, the StackContainer correctly resizes to the center region of it's parent BorderContainer.
The problem I have is that the StackContainer children (BorderContainer 2 and 3) do not get resized to the StackContainer's contentBox.
Is there something special you have to do to force a resize of StackContainer children? I have tried calling StackContainer1.resize() but this makes no difference.
Thanks in advance.
Additional information:
Thanks for the reply peller. The widget hierachy that contains the StackContainer is actually a custom widget, so the StackContainer is not actually in a BorderContainer directly, but has its height and width explicitly set to 100%. This works and the StackContainer is resized correctly on browser maximise. The direct children of the stackcontainer are BorderContainers and it is these BorderContainers that do not get resized when the StackContainer is resized. One point to note is that when the StackContainer is created in markup, the stackcontainer children are empty divs. These divs are then used as placeholders for custom widget creation, e.g.
var widget = new com.company.widget(params, placeholderDiv);
where placeholderDiv is a direct child of the StackContainer in markup. Should I be adding the programatically created 'widget' to the stackcontainer using addChild instead?
© Stack Overflow or respective owner