PDA

View Full Version : Content of Form with Tabpanel does not resize with other tabs selected than first



shr3k
27 Mar 2015, 9:20 AM
Hello,

I have little problem with one of my resizable windows. It contains a formpanel with some textarea fields in tabs. Everything's working fine until is other than first tab selected, then whole content of formpanel stays resized. Interesting, that toptoolbar of formpanel is floating just fine.


MyProject.TemplateWindowUi = Ext.extend(Ext.Window, {
width: 640,
height: 480,
layout: 'fit',
border: false,
plain: true,
title: 'Title',
iconCls: 'silk-cog-edit',
initComponent: function () {
Ext.applyIf(this, {
items: [
{
itemId: 'template',
xtype: 'form',
bodyStyle: 'background: none',
tbar: [
{'->'},
{
itemId: 'save',
disabled: true,
xtype: 'button',
iconCls: 'silk-database-save',
text: 'Save',
scope: this,
handler: function(b, e) {


}
}
],
items: [
{
xtype: 'hidden',
name: '_id'
},
{
xtype: 'hidden',
name: '_rev'
},
{
xtype: 'hidden',
name: 'project'
},
{
xtype: 'textfield',
name: 'title',
fieldLabel: 'Title'
},
{
itemId: 'tabs',
xtype: 'tabpanel',
activeTab: 0,
border: false,
bodyStyle: 'background: none;',
anchor: '100% 100%',
items: [
{
title: 'HTML template',
layout: 'fit',
items: [
{
xtype: 'htmleditor',
name: 'template',
enableColors: false,
enableFont: false,
enableFontSize: false,
enableLinks: false
}
]
},
{
title: 'CSS styles',
layout: 'fit',
items: [
{
xtype: 'textarea',
name: 'style'
}
]
},
{
title: 'Smarty variables',
layout: 'fit',
items: [
{
xtype: 'textarea',
name: 'smarty'
}
]
}
]
}
]
}
]
});
MyProject.TemplateWindowUi.superclass.initComponent.call(this);
}
});

shr3k
29 Mar 2015, 7:04 AM
Okay, after some investigation looks like attaching tabchange listener with Ext.Window > doLayout() helped.

Gary Schlosberg
2 Apr 2015, 3:23 PM
Glad to hear you got it working, and thanks for following up here.