爲什麼我的gridPanel在tabPanel中顯示錯誤的高度?
在附圖中,網格顯示不正確。網格在tabpanel內。該選項卡的佈局='適合'。
什麼設置錯誤導致行爲? 編輯: 下面是一個tabpanel類定義:我們的標籤是一個叫做「外部ID」
/*
* File: SomeTabPanel.ui.js
* Date: Mon May 02 2011 18:08:34 GMT-0400 (Eastern Daylight Time)
*
* This file was generated by Ext Designer version xds-1.0.3.2.
* http://www.extjs.com/products/designer/
*
* This file will be auto-generated each and everytime you export.
*
* Do NOT hand edit this file.
*/
SomeTabPanelUi = Ext.extend(Ext.TabPanel, {
activeTab: 0,
forceLayout: true,
border: false,
enableTabScroll: true,
initComponent: function() {
this.items = [{
xtype: 'panel',
title: 'General',
layout: 'table',
tpl: '',
ref: 'GeneralTab',
layoutConfig: {
columns: 2
},
items: [{
xtype: 'form',
title: 'Corporate',
height: 500,
width: 500,
animCollapse: false,
items: [{
xtype: 'box',
ref: '../../coporateBox'
}]
}]
},{
xtype: 'panel',
title: 'External ID',
layout: 'fit',
ref: 'ExtIdTab',
id: ''
}];
SomeTabPanelUi.superclass.initComponent.call(this);
}
});
網格不需要高度或autoHeight:true - 容器的佈局應該管理它。 – 2011-05-03 06:55:46
該tabpanel包含在另一個面板內。並且需要有---> layout:'border'而不是layout:'fit' – Victor 2011-05-03 16:53:50