PDA

View Full Version : Extjs 4.1 panel height as Window Size



mandardadpe
8 Aug 2012, 6:21 AM
I have panel in tab panel . If I assign autoHeight or height to panel then ,there is white space below panel and it looks bad. I want remove that white space and change height as per the window.
Please help to solve issue 'change height of panel as per the window size'.

friend
8 Aug 2012, 6:51 AM
It sounds like a layout problem. If you would, please post a code sample which illustrates the configuration of your tabpanel and child panel(s).

scottmartin
8 Aug 2012, 8:03 AM
What is the layout for your window? You can use 'fit' so the panel will follow.

Scott.

mandardadpe
8 Aug 2012, 8:45 PM
Basically, in tab panel I have two items :[ grid,formPanel ] . Grid is located at top and form panel at bottom. So,on large screen there is space remains below formPanel...For Form Panel my code is:
frame: true,
id: 'miscSubUser',
forceFit:true,
autoHeight:true,
autoWidth:true,
bodyPadding:20,
autoScroll:true,
And under that ,I have : layout: {
type: 'hbox',
align:'center'

},
which contains panel and tree...I dont want white space below formPanel ,it should be managed as per Window size

friend
9 Aug 2012, 6:04 AM
Note that ExtJs 4.x doesn't support autoHeight or autoWidth; these config attributes are silently ignored.

You also mention that your grid is at the top of the tab and the form at the bottom; this implies a vbox layout, not an hbox.

The container which acts as the containing tab for your grid/form should probably look something like this. :



{
xtype: 'container',
layout: {
type: 'vbox',
align: 'stretch'
},
items: [{
xtype: 'grid',
flex: 1,
<...>
},{
xtype: 'form',
height: 200,
<...>
} ]
}