PDA

View Full Version : how to dynamically change the position of a panel from west to north



Dumbledore
21 Dec 2010, 5:20 AM
Hi,

which is the correct way to change the position of a panel inside a borderlayout?


Bye, Dumbledore

Animal
21 Dec 2010, 5:38 AM
Why is it a problem?

Remove it from the layout: 'fit' west Container, and add it to the (empty) layout:'fit' north Container.

Dumbledore
21 Dec 2010, 5:40 AM
the problem is, that i have not a north container on rendering. Must i do a hidden container?

Animal
21 Dec 2010, 5:50 AM
Yes if you are sure you need a border layout. As its API docs state, the regions are fixed at render time.

Maybe it would be better using a top level vbox layout.

The top one would be your "north" (though there are no regions in box layouts)

Then below would be a central Container which would be layout: 'border' with a west and center (Only needs to be border if you are using the splitbar to drag - otherwise it could be an hbox layout)

Dumbledore
21 Dec 2010, 5:54 AM
Thanks for your answer. In my case both regions should be resizable via splitbar so i must use a borderlayout...