nin*_*nse 2 javascript mobile extjs sencha-touch sencha-touch-2
我想知道如何在底部停靠的工具栏中居中对齐两个按钮.在我看到的buttosn上解决这个问题的唯一属性是,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);
}
});
Run Code Online (Sandbox Code Playgroud)
Eli*_*Eli 10
你可以给你toolbar
一个布局配置:
layout: {
pack: 'center',
type: 'hbox'
}
Run Code Online (Sandbox Code Playgroud)
这将使您的项目水平呈现在此工具栏的中心.
归档时间: |
|
查看次数: |
9523 次 |
最近记录: |