2012-06-29 2 views
0

У меня есть панель с двумя кнопками, которая используется внутри другой панели. Сейчас он правильно отображает кнопки, но я хотел бы добавить границу между ними. Как правильно настроить макет, чтобы получить это?Добавить поля между элементами в Ext.Panel

enter image description here

return Ext.create('Ext.panel.Panel', { 
     width: 220, 
     height: 35, 
     border: false, 
     collapsible: false, 
     renderTo: renderTo, 

     items : [  
      { 
       xtype: 'button', 
       scale: 'medium', 
       text: this.exportButtonText, 
       handler: function() { 
        var form = this.form.getForm(); 

        if (form.isValid()) { 
         var values = form.getValues(); 
         form.reset(); 

         this.plugin.printSettings = values; 

         this.progressBar.show(); 
         this.plugin.doPrint(); 
        } 
       }, 
       scope: this 
      }, 
      { 
       xtype: 'button', 
       scale: 'medium', 
       text: this.cancelButtonText, 
       handler: function() { 
        me.close(); 
       }, 
       scope: this 
      }     
     ] 
    }); 

ответ

1

Добавьте это между ними:

{ 
xtype: 'tbspacer', 
flex: 1 
} 
3

Или добавьте в левую кнопку определения:

{ 
    margin: '0 5px 0 0' 
} 
Смежные вопросы