admin管理员组文章数量:1387396
I have hbox and 2 toolbars inside... I need align first to left and second to right even if first is hidden
{
layout: 'hbox',
items: [
{
xtype : 'toolbar',
itemId: 'searchToolbar',
items : [
...
]
},
{
xtype: 'toolbar',
items: [
...
]
}
]
},
I have hbox and 2 toolbars inside... I need align first to left and second to right even if first is hidden
{
layout: 'hbox',
items: [
{
xtype : 'toolbar',
itemId: 'searchToolbar',
items : [
...
]
},
{
xtype: 'toolbar',
items: [
...
]
}
]
},
Share
Improve this question
asked Sep 11, 2014 at 9:48
Oleg PatrushevOleg Patrushev
2653 silver badges16 bronze badges
0
2 Answers
Reset to default 4Try this..this is pretty much as per your requirement according to my understanding.
Ext.define('My.test.Viewport', {
extend: 'Ext.container.Viewport',
requires: [
'Ext.layout.container.Border',
'Ext.layout.container.HBox',
'Ext.toolbar.Toolbar',
'Ext.toolbar.TextItem',
'Ext.toolbar.Fill'
],
autoScroll: true,
items:[
{
layout: 'hbox',
items: [
{
xtype : 'toolbar',
itemId: 'searchToolbar',
items : [
{
xtype: 'tbtext',
text: 'Item1'
}
]
},
{
xtype: 'tbfill'
}
,{
xtype: 'toolbar',
items: [
{
xtype: 'tbtext',
text: 'Item2'
}
]
}
]
}
]
});
Ext.create('My.test.Viewport');
Is there any restrictions that prevents you from using CSS? If not can you not add itemCls to the config with one class for floating left and one for right?
items: [{
xtype: 'toolbar',
itemCls: 'toolbar-dock-left',
...
}, {
xtype: 'toolbar',
itemCls: 'toolbar-dock-right',
...
}
本文标签: javascriptAlign one child to left and second to right extjsStack Overflow
版权声明:本文标题:javascript - Align one child to left and second to right extjs - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744550487a2612154.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论