PDA

View Full Version : Tabpanel - what is wrong? [solved]



janhov
15 Apr 2009, 3:21 AM
Hi. My tabpanel looks like this:

http://folk.uio.no/janhov/div/tab0.png
http://folk.uio.no/janhov/div/tab1.png
http://folk.uio.no/janhov/div/tab2.png



xtype: 'tabpanel',
activeTab: 0,
plain: true,
defaults: {layout: 'fit', bodyStyle: 'padding:8px'},
items: [

<Three tab components with one combobox as an item in each of them. The comboboxes are exactly the same (except id).>

]


Why are tab no 2 and 3 different from the first one? They have the same content.

BitPoet
15 Apr 2009, 3:49 AM
Try setting layoutOnTabChange: true for the tab panel.

janhov
15 Apr 2009, 3:52 AM
Hi. Yeah I read that in the FAQ, but unfortunately it did not work.

BitPoet
15 Apr 2009, 3:57 AM
Does hideMode: 'offsets' solve it?

janhov
15 Apr 2009, 4:08 AM
Nope :(

BitPoet
15 Apr 2009, 5:16 AM
Can you give a working example that illustrates the problem?

janhov
15 Apr 2009, 6:37 AM
Well, I can paste the code and the behaviour is exactly like the pictures show.



{
xtype: 'tabpanel',
activeTab: 0,
plain: true,
defaults: {layout: 'fit', bodyStyle: 'padding:8px'},
items:
[
{
title:'New map',
id: '0',
defaults:{layout: 'fit', border: false, bodyStyle: 'padding:10px'},
items:
[
{
xtype: 'combo',
id: 'newmap_cb',
typeAhead: true,
editable: false,
valueField: 'level',
displayField: 'name',
emptyText: 'Select organisation unit level',
mode: 'remote',
forceSelection: true,
triggerAction: 'all',
selectOnFocus: true,
width: combo_width,
store: organisationUnitLevelStore,
listeners: {
'select': {
fn: function() {
var level = Ext.getCmp('organisationunitlevel_cb').getValue();
organisationUnitStore.baseParams = { level: level, format: 'json' };
organisationUnitStore.reload();
},
scope: this
}
}
}
]
},

{
<edit map> // different id's only
},

{
<delete map> // different id's only
}
]
}

BitPoet
15 Apr 2009, 7:17 AM
It's still hard to guess from that snippet what may be wrong. Using it in my own code, it doesn't behave like you describe. It could also be a nesting or layout mixing issue. However, you might give setting "deferredRender: false" on the tabpanel a try.

janhov
15 Apr 2009, 7:19 AM
Worked! Thanks a lot.