在选项卡面板中添加面板

时间:2012-07-05 07:42:05

标签: extjs4.1

我正在尝试显示网格,但在List of customers和列Customer Id, active, firstname last name, email address之间添加了一个面板。

我需要在这两个组件之间添加一个面板。在该面板中,我将使用不同的UI元素。我怎么能这样做?

enter image description here

2 个答案:

答案 0 :(得分:2)

嗯,我相信你只有一个网格与客户的标题列表,最简单的方法是将一个面板和一个网格(没有标题的网格)放到另一个带标题的面板中。

{
  xtype: 'panel',
  title: 'List of customers',
  layout:'border',
  items: [
      {
         //the panel you want
         xtype: 'panel',
         region: 'north',
         height: 100,
      },
      {
          //your current grid without a title
          xtype: 'gridpanel',
          region: 'center',
          height: 300,
      }
  ]
}

答案 1 :(得分:1)

我需要添加面板,标题为“List if Customers”和垂直布局。在其中,您需要添加两个项目:新面板和该网格(没有标题)。那里你会得到你想要的东西。

{
  xtype: 'panel',
   layout: {
      type:"vbox",
      pack:"start",
      align:"stretch"}
   title:"List of Customers",
   items: [ ... your new panel and grid .. ] 
}
相关问题