0

在此处输入图像描述

在所附图像中,网格未正确显示。网格位于选项卡面板内。选项卡的布局是 = 'fit'。

什么设置错误导致了这种行为?编辑:这是选项卡面板的类定义:我们的选项卡是名为“外部 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);
   }
});
4

2 回答 2

0

看起来你需要以某种方式为网格设置一个高度。手动高度声明,autoHeight: true或从父容器继承的高度。

父 tabPanel 是否声明/继承了高度?

设置layout: 'fit'对于包含选项卡来说是一个好的开始,但如果没有一些代码或测试用例,我将无法提供更多帮助。

于 2011-05-02T23:19:02.520 回答
0

它应该像描述的那样工作,所以你的代码一定有问题。如果您需要更多帮助,请发布您的布局代码。

于 2011-05-03T06:56:43.957 回答