是否可以將我的一些項目放置在我的面板中左側,最後一個項目位於右側?這樣中間就有一個空的空間。現在我使用的hbox佈局,並把一個空的容器在中間,彎曲像這樣:在hbox佈局中放置單個項目extjs
items: [{
xtype: 'container',
layout: 'hbox',
items: [{
xtype: 'label',
text: 'Filter on vehicle'
},{
xtype:'textfield'
},{
xtype: 'button',
text: '...'
},{
xtype: 'container',
flex:1
},{
xtype: 'button',
text: 'New'
},{
xtype:'button',
text: 'Edit'
},{
xtype: 'button',
text: 'Delete'
}]
}]
什麼更好的辦法來做到這一點?
不,這是最好的辦法。唯一的辦法是將容器做成一個組件,但這很小。 –