Extjs 如何将搜索框设置为中心?
如何将搜索框/文本字段设置为工具栏的中心 这是我正在使用的代码Extjs 如何将搜索框设置为中心?,extjs,extjs4,Extjs,Extjs4,如何将搜索框/文本字段设置为工具栏的中心 这是我正在使用的代码 Ext.create('Ext.toolbar.Toolbar', { renderTo: document.body, width : 500, items: [ { text: 'Button1' }, '->', { xtype : 'textfield',
Ext.create('Ext.toolbar.Toolbar', {
renderTo: document.body,
width : 500,
items: [
{
text: 'Button1'
},
'->',
{
xtype : 'textfield',
name : 'field1',
emptyText: 'Enter search term'
},
'-',
{
text: 'Button2'
}
]
});
注意:我正在使用Extjs 4.2.1只需在textfield定义之后添加
'->'
或{xtype:'tbfill'}
:
项目:[
{
文本:“按钮1”
},
'->',
{
xtype:'textfield',
名称:'field1',
emptyText:“输入搜索词”
},
'->',
'-',
{
文本:“按钮2”
}
]
Haha。。谢谢朋友:)