PDA

View Full Version : tabpanel within layout fit



gustavoh84
8 Sep 2009, 11:33 AM
Hi!
How to configure a tabpanel for layout fit?
When I try that, the firebug show a error message:

this.layout.setContainer is not a function
Ext.DomHelper=function(){var s=null,j=/^...b.stopEvent();this.completeEdit()}}}});


Follow the code:

var tabAccept = new Ext.TabPanel({
renderTo: Ext.get('accept'),//Ext.getBody(),
activeTab: 0,
border: false,
frame: false,
layout: 'fit',
items: [ items here ]

})

Jack9
8 Sep 2009, 11:42 AM
layout:'fit'

A tabpanel, by NATURE is a card layout. That's how tabs work. You can't change that in a tabpanel. You want to put 'fit' in the items that are within the tabpanel.


Ext.onReady(function(){

var tabAccept = new Ext.TabPanel({
renderTo: Ext.get('testDiv'),//Ext.getBody(),
activeTab: 0,
border: false,
frame: false,
//layout: 'fit', // Uncomment to test.
items: [
//items here
new Ext.Panel({
title:"TestPanelItem",
layout:'fit'
})
]
});
});

gustavoh84
8 Sep 2009, 12:00 PM
Hi!
I need the formpanel (inside tabpanel) has height 100%.
See the url:
http://www.gustavohenrique.net/temp/formpanel.jpg

Jack9
8 Sep 2009, 12:28 PM
formPanel.setHeight(document.body.clientHeight);