View Full Version : How-to resize a BorderLayout region programatically ?
lioledingue
3 Sep 2008, 4:45 AM
Hi all,
I would like to resize a BorderLayout region programatically.
Is it possible ?
If yes, how ?
And if not, where in the GXT library does the event is catched ?
Thanks a lot !
y(oYo)
Kango_V
3 Sep 2008, 2:40 PM
Seconded. We'd like to know how to collapse the regoin in code. This is useful for preview panes etc.
darrellmeyer
3 Sep 2008, 7:34 PM
You this:
ContentPanel west = new ContentPanel();
west.getState().put("collapsed", true);
lioledingue
3 Sep 2008, 11:40 PM
Does anybody has a solution for my problem ?
Thx
Kango_V
3 Sep 2008, 11:41 PM
Thanks Darrell, I'll give it a try :)
lioledingue
4 Sep 2008, 12:10 AM
up
seb2nim
4 Sep 2008, 4:13 AM
New thread created :
BorderLayout : Panel collapsed by default and programatically (http://extjs.com/forum/showthread.php?p=218863#post218863)
lioledingue
4 Sep 2008, 4:23 AM
Could you make a separate topic to find your solution, and leave my topic so I can find mine please ?
lioledingue
24 Sep 2008, 5:42 AM
I found my solution !
In fact it is very simple :
- Step 1 : Get the BorderLayoutData instance
- Step 2 : Change the height of the data instance by calling data.setHeight(float height)
- Step 3 : Do a layout() of the borderLayoutContainer
That's works quite fine !
albertogiantin
7 Jan 2010, 12:57 AM
I think you are wrong. The method setHeight(float height) in class BorderLayoutData doesn't exist.
lioledingue
7 Jan 2010, 1:33 AM
Hum, I have made a mistake on my post, understand setSize() instead of setHeight() :">
albertogiantin
7 Jan 2010, 1:41 AM
It works well thanks!
sempervivo
15 Sep 2010, 7:06 AM
Isn't any other way to set an autoheight flag to the region so that it takes the height of the component it contains ?
No. The GXT layout system works from top to bottom. This means the parent sizes its children.
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.