Layout 在面板extjs 4中布局按钮

Layout 在面板extjs 4中布局按钮,layout,button,extjs,extjs4,panel,Layout,Button,Extjs,Extjs4,Panel,我在尝试在extjs 4.07中为我的用户界面设置一些按钮时遇到了一些严重的问题。我有一个基本布局,我想更改,但是每次更改某个按钮时,其中一个按钮会消失,或者占据整个面板,或者根据我输入的配置,其他一些没有意义的东西。我需要帮助。代码如下: {xtype:'panel', columnWidth:.06, layout:'vbox', items:[ {xtype:'button', text:'=>', action'moveOver'}, {xtype:'b

我在尝试在extjs 4.07中为我的用户界面设置一些按钮时遇到了一些严重的问题。我有一个基本布局,我想更改,但是每次更改某个按钮时,其中一个按钮会消失,或者占据整个面板,或者根据我输入的配置,其他一些没有意义的东西。我需要帮助。代码如下:

{xtype:'panel',
  columnWidth:.06,
  layout:'vbox',
  items:[
    {xtype:'button', text:'=>', action'moveOver'},
    {xtype:'button', text:'<=', action'moveBack'},
    {xtype:'button', text:'reset', action'reset'}
  ]
}
{xtype:'panel',
列宽:.06,
布局:'vbox',
项目:[
{xtype:'button',text:'=>',action'moveOver'},

{xtype:'button',text:'您是否查看了Sencha文档网站上的示例?看起来您只是希望您的项目中心与它们之间的一些边距对齐。类似这样的内容应该可以让您开始:

layout: {
    type:  "vbox",
    align: "center"
},
defaults: {
    margin: "10 0 0 0"  // Same as CSS (top right bottom left)
},
items: [
    /* Button declarations here */
]

您看过Sencha文档网站上的示例了吗?看起来您只是想让您的项目中心与它们之间的一些边距对齐。类似的内容应该可以让您开始:

layout: {
    type:  "vbox",
    align: "center"
},
defaults: {
    margin: "10 0 0 0"  // Same as CSS (top right bottom left)
},
items: [
    /* Button declarations here */
]

够了!非常感谢。够了!非常感谢。
layout: {
    type:  "vbox",
    align: "center"
},
defaults: {
    margin: "10 0 0 0"  // Same as CSS (top right bottom left)
},
items: [
    /* Button declarations here */
]