我有以下几个按钮容器:ExtJS的对齐按钮中心集装箱
{
xtype : 'container',
width : 320,
layout : 'hbox',
cls : 'readable-form no-border',
labelSeparator : '',
ref : '../sendBackForm',
layoutConfig: {
padding:'5',
pack:'center',
align:'middle'
},
style : {
margin : 'auto'
},
items : [ {
xtype : 'button',
itemId : 'yes',
iconCls : 'save-button-icon',
text : 'Yes',
ref : '../../yes'
}, {
xtype : 'spacer',
width : 10
}, {
xtype : 'button',
itemId : 'checker',
iconCls : 'save-button-icon',
text : 'Back to checker',
ref : '../../checker'
}, {
xtype : 'spacer',
width : 10
}, {
xtype : 'button',
itemId : 'prebooker',
iconCls : 'save-button-icon',
text : 'Back to prebooker',
ref : '../../prebooker'
}, {
xtype : 'spacer',
width : 10
}, {
xtype : 'button',
itemId : 'cancel',
text : 'Cancel',
ref : '../../cancel'
}, {
xtype : 'spacer',
width : 90
}, {
xtype : 'button',
itemId : 'ok',
hidden : true,
text : 'Ok',
ref : '../../ok'
} ]
}
的问题是,当我隐藏所有的按钮和希望只显示OK按钮,它会显示在靠近窗口左边的角落,我怎么能把它放在窗户的中间?
您正在使用的Extjs版本是什么? – AJJ