PDA

View Full Version : Problem with tabpanel in window



Eugent
27 Jul 2012, 3:09 AM
Hello, i have a problem with tabs in tabpanel in window. On some tabs all good work, but in some of tabs on check tab it is disable tools of parent window and disable top panel of tabs.

I use ExtJS 4.1.1.

Early have so problem when use grid in tab. Not solved.

screens:
On 1 tab:
37544

On 2 tab:
37545

app.js:


...
launch: function() {
App = this;
//?????????????? ?????? ??????????? ?????????
Ext.QuickTips.init();

var tree = this.getController('Testero.controller.Tree').getRegionTree();

//??????? ???????????? ??????
Ext.create('Ext.container.Viewport', {
name : 'base',
layout : 'border', //??????? ??????? ?????? - ??????
//????????? ?? ????????? ??? ????????? ???????
defaults: {
xtype: 'panel', //??? ???????? - ??????
split: true, //????? ??????????? ?????????? ????????? ??????
collapsible: true, //????????? ??????????? ???????????? ??????
hideCollapseTool: true, //???????? ?????????? ???????????? ?????? ? ?????????
collapseMode: 'mini' //??? ?????????? ??????????? ??????? ??????
},
//???????? ???????
items : [
{
xtype : 'toolbar',
region : 'north',
split : false,
collapsible : false,
items : [
{
text : 'TabPanel',
name : 'showTabPan'
}
]
},
tree,
//??????????? ??????
{
xtype: 'systemcenter',
region: 'center'
}
]
});
}
...


view of Window:


//?????????? ????????????? ??????????? ?????? ???????
Ext.define('Testero.view.Window' ,{
extend : 'Ext.window.Window', //?????????, ??????? ????????? ?????????????
alias : 'widget.appWindow', //???????? ???????? ???? ???????

layout : 'fit',
modal : true,
draggable : false,
resizable : false,
floatable : false,

defaults: {
minWidth : 400,
minHeight : 200
}
});


code of controller:


...
this.control({
'viewport toolbar[region=north] button[name=showTabPan]': {
click: function(th_but){
var win = Ext.create('widget.appWindow', {
title : 'TabPanel',
items : [
{
xtype : 'tabpanel',
items : [
{
xtype : 'panel',
title : 'Simple Panel',
html : 'It is simple panel'
},
{
xtype : 'baseFormSimple',
title : 'Simple Form'
}
]
}
]
});

win.show();
}
}
});
...

scottmartin
27 Jul 2012, 2:24 PM
You will need to provide more info, or a small working example.. you have: baseFormSimple
but have not included in your code set.

You screen gives the impression that you are trying to render before everything is ready.

If you create a stand-alone app and create the window with each tab, does it work?

Scott.

Eugent
28 Jul 2012, 8:17 AM
You will need to provide more info, or a small working example.. you have: baseFormSimple
but have not included in your code set.

You screen gives the impression that you are trying to render before everything is ready.

If you create a stand-alone app and create the window with each tab, does it work?

Scott.

Hello, i create simple example here:
http://extdev.eugent.org/testero/

to Launch example with this problem click button "TabPanel" at north toolbar.

This problem is appear when i add form or grid in tabpanel as tab. Tabpanel in this examples is child of window.

Eugent
31 Jul 2012, 3:05 AM
And what about my question?

friend
31 Jul 2012, 4:11 AM
I noticed that the Toolbar which acts as your north region doesn't declare a height. As a diagnostic stop, assign a fixed height value and see if this helps the problem:



{
xtype : 'toolbar',
region : 'north',
height: 50, // <--- fixed height
split : false,
collapsible : false,
items : [{
text : 'TabPanel',
name : 'showTabPan'
}]
}

Eugent
31 Jul 2012, 9:05 AM
I noticed that the Toolbar which acts as your north region doesn't declare a height. As a diagnostic stop, assign a fixed height value and see if this helps the problem:...

I thought that the height is automatically billed properly. But even if the tracked this error persists