方法一:

Ext.create('Ext.panel.Panel', {
     title: 'Toolbar Fill Example',
     width: 300,
     height: 200,
     tbar : [
         'Item 1',
         '->',
         'Item 2'
     ],
     renderTo: Ext.getBody()
 });


 方法二:

 Ext.create('Ext.panel.Panel', {
     title: 'Toolbar Fill Example',
     width: 300,
     height: 200,
     tbar : [
         'Item 1',
         { xtype: 'tbfill' },
         'Item 2'
     ],
     renderTo: Ext.getBody()
 });

 

备注:若是想要放置在中间或者一个灵活的位置,可以用margin属性。

相关文章:

  • 2021-05-17
  • 2021-10-10
  • 2022-12-23
  • 2021-11-14
  • 2022-02-09
  • 2021-08-31
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-31
  • 2021-09-26
  • 2022-12-23
  • 2021-12-24
相关资源
相似解决方案