我不知道该如何去做,buttonAlign: 'center'
也不是pack: 'center'
正在工作。小提琴:http://jsfiddle.net/3Ytp9/ExtJS - 按钮组中的中心项目
0
A
回答
1
使用的ButtonGroup的layout属性:
layout: {
type: 'vbox',
align: 'center'
}
0
尝试:
Ext.onReady(function() {
var panel = Ext.create('Ext.form.Panel', {
renderTo: Ext.getBody(),
title: 'Button group',
border: true,
layout: {
align: 'middle',
pack: 'center',
type: 'hbox'
},
width: 500,
items: [{
xtype: 'buttongroup',
columns: 1,
items: [{
xtype: 'button',
text: 'Go'
}, {
xtype: 'button',
text: 'Reset'
}]
}]
});
});
具有由侧面的按钮侧,取出columns:1
- 也注意到,在对的jsfiddle Ext JS的实现是可怕的,所以不要依靠它太多。
1
您是否考虑过在面板底部使用工具栏?
https://fiddle.sencha.com/#fiddle/1c0(不MVC模式)
您也可以使用这样的事情:
dockedItems: [{
xtype: 'toolbar',
layout: {
pack: 'center'
},
defaultButtonUI: 'default', // get default look and feel
dock: 'bottom',
items: [{
xtype: 'button',
width: 200,
text: 'Download to Excel',
},{
xtype: 'button',
width: 200,
text: 'Another action',
}]
问候。
+0
嗯,任何方式居中他们没有使用停靠的工具栏? –
相关问题
- 1. ExtJS中的中心对齐按钮
- 2. ListView中的按钮项目
- 3. 中心按钮
- 4. 中心按钮
- 5. 与按钮项目数组
- 6. ExtJS中的浏览按钮
- 7. 标题中的按钮ExtJs
- 8. CSS中的中心按钮
- 9. ExtJS的对齐按钮中心集装箱
- 10. iOS凸起中心选项卡按钮
- 11. ExtJS的按钮
- 12. 如何通过按钮按下数组中的项目?
- 13. 按钮中心CSS
- 14. 引导 - 列表组中的输入组按钮项目
- 15. 中心WordPress的按钮
- 16. Android的中心按钮
- 17. GridLayout中的中心项目
- 18. NSCollectionView中的中心项目
- 19. 自定义项目添加到单选按钮,在ExtJS的
- 20. ExtJS组件上的Twitter按钮
- 21. ExtJS的unpress按钮
- 22. Extjs Cellediting按钮
- 23. 项目控件中的互斥按钮
- 24. JComboBox项目中的显示按钮
- 25. 带项目模板中的按钮的组合框
- 26. 与中心项目
- 27. CSS中心项目
- 28. 按钮位于按钮中心的对齐按钮iOS
- 29. 定位列表组项目按钮
- 30. 列表组项目中的可点击按钮或图形
似乎并没有工作:https://fiddle.sencha.com/#fiddle/1cf –