PDA

View Full Version : [OPEN-EXTJSIV-211] Floating TabPanel height change



mitchellsimoens
16 Mar 2011, 11:59 AM
I have a floating TabPanel with a couple tabs. One of them is a FormPanel that has many items under it. When switch to that tab, the TabPanel should resize itself but it never does. I have tried adding a listener to the cardswitch event to do the layout to the new card and tabpanel but nothing solid works.

mitchellsimoens
16 Mar 2011, 12:23 PM
Turns out it's not just on floating TabPanels. When you switch tabs, the height does not act right. Best way to show you is a form I made with a TabPanel it in. If you switch between tabs, the height adjusts but half the time the height is not correct. Code is lengthy.


http://www.simoens.org/videos/PR4%20TabPanel%20Height.mp4


new Ext.form.FormPanel({
renderTo : Ext.getBody(),
width: 500,
title : "Test",
defaults : {
anchor : "100%"
},
items : [
{
layout : "column",
border : false,
items : [
{
columnWidth : .5,
border : false,
frame : true,
layout : "anchor",
defaults : {
anchor : "100%"
},
defaultType : "textfield",
items : [
{
fieldLabel : "First Name"
},
{
fieldLabel : "Company"
}
]
},
{
columnWidth : .5,
border : false,
frame : true,
layout : "anchor",
defaults : {
anchor : "100%"
},
defaultType : "textfield",
items : [
{
fieldLabel : "Last Name"
},
{
fieldLabel : "Email",
vtype : "email"
}
]
}
]
},
{
xtype : "tabpanel",
plain : true,
activeTab : 0,
defaults : {bodyStyle:"padding:10px"},
items : [
{
title : "Phone Numbers",
frame : true,
defaults : {
anchor : "100%"
},
defaultType : "textfield",
autoScroll : true,
items : [
{
fieldLabel : "Home"
},
{
fieldLabel : "Business"
},
{
fieldLabel : "Mobile"
},
{
fieldLabel : "Fax"
}
]
},
{
title : "Address",
frame : true,
defaults : {
anchor : "100%"
},
defaultType : "textfield",
autoScroll : true,
items : [
{
fieldLabel : "House #"
},
{
fieldLabel : "Street"
},
{
fieldLabel : "Apartment"
},
{
fieldLabel : "City"
},
{
fieldLabel : "State"
},
{
fieldLabel : "Zip"
}
]
}
]
},
{ xtype : "textarea", fieldLabel : "Note", allowBlank : false, tabIndex : 6 }
]
});

mankz
16 Mar 2011, 1:18 PM
Your tabpanel childen have no layout specified, could that be the cause?

mitchellsimoens
16 Mar 2011, 1:24 PM
Your tabpanel childen have no layout specified, could that be the cause?

Technically it defaults to auto. Tried it with some of them but still the height issue is still there.

PV-Patrick
16 Mar 2011, 11:03 PM
I am experiencing the same problem with TabPanels. It's not limited to just Forms, it also does it with a Grid inside the tab as well.

PV-Patrick
19 Mar 2011, 4:10 PM
Just wanted to confirm this is still an issue in PR5.