我想知道如何将底部停靠工具栏中的两个按钮居中对齐。我在按钮上看到的唯一解决这个问题的属性是 centered
但它使按钮绝对重叠在按钮的中心,有没有办法将它们分组在中心?
这是我一直在使用的一些代码:http://www.senchafiddle.com/#xTZZg#k24Ni
Ext.Loader.setConfig({
enabled: true
});
Ext.application({
name: 'SenchaFiddle',
launch: function () {
var panelNewForm = Ext.create('Ext.Panel', {
id: 'panelNewForm',
title: 'TEST',
html: 'TEST',
pack: 'center',
items: [{
xtype: 'toolbar',
docked: 'bottom',
layout: {
type: 'hbox',
align: 'center'
},
items: [{
ui: 'decline',
text: 'Cancel',
handler: function () {
}
}, {
ui: 'confirm',
text: 'Save',
handler: function () {
}
}]
}]
});
Ext.Viewport.add(panelNewForm);
}
});
最佳答案
关于javascript - Sencha 触摸 : How to center align two buttons in bottom docked toolbar?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14814772/