PDA

View Full Version : Help: make app to expand as needed in BorderLayout



bhanugsm123Q
27 Apr 2008, 4:36 PM
Hi all,

I'm putting my app in a BorderLayout, but I don't want to use Viewport - I want my app to expand as long as the content requires. However setting height of the main component to "auto" doesn't help (actually the document did say that auto doesn't have effect). Not setting the height will cause the size set to 0, and the main Ext component get totally hidden.

Is there anyway to accomplish what I want?

Thanks,
- Bhanu

mjlecomte
27 Apr 2008, 5:27 PM
You're not very specific what you're doing, but autoHeight:true may help. Check the tabs examples.

bhanugsm123Q
27 Apr 2008, 11:30 PM
OK, I will try to be clearer.

My app is constructed as a Panel with Border layout. The west panel is a tree menu as a TreePanel, the central panel is a TabPanel, the north is the master head. When select menu item in the tree, a tab will be opened. It's quite similar to Ext API UI. There're some reasons which I don't use Viewport for the main UI, such as I don't want the master head to always stick to the top.

The problem I have is that I want the main Panel to grow its height according to the height of tab content. But look like in Ext we need to set a fixed height for each compoent before created. set autoHeight:true doesn't do anything (because it set css height attribute to "auto", which browsers don't respect)

- Bhanu


You're not very specific what you're doing, but autoHeight:true may help. Check the tabs examples.

Animal
27 Apr 2008, 11:31 PM
Use a Viewport.