2012-07-30 1 views
1

다음과 같습니다. 첫 번째 항목 'create'가 오른쪽에 정렬되기를 바랍니다.extf로 tbfil을 사용하여 버튼을 올바르게 정렬하기 4.1

'tbfill'을 사용하여 정렬하는 방법에 대해 읽었습니다. 하지만 내 구현과 함께 이것을 사용하는 방법을 잘 모르겠습니다.

 dockedItems:[      { 
         xtype:'toolbar', 
         flex:1, 
         dock:'top', 
         items:[ 
          { 


           xtype:'button', 
           id: 'ContactCreate', 
           name: 'ContactCreate', 
           text:'Create', 
           action:'create', 
           align: 'right', 
           style: 'float:right', 
           width:'100', 
           iconCls:'icon-add' 


          }, 
          { 
           xtype:'button', 
           id: 'ContactSave', 
           name: 'ContactSave', 
           text:'Save', 
           action:'save', 
           width:'100', 
           iconCls:'icon-save' 
          }, 


          { 
           xtype:'button', 
           id: 'ContactDelete', 
           name: 'ContactDelete', 
           text:'Delete', 
           action:'delete', 
           width:'100', 
           iconCls:'icon-delete' 
          } 


         ] 
        } 
       ], 

답변

4

실제 항목에 tbfill을 추가한다고 생각했습니다. 다음은 작동하는 예제입니다.

   dockedItems:[ 
        { 
         xtype:'toolbar', 
         flex:1, 
         dock:'top', 
         items:[ 
          { 
           xtype:'button', 
           id: 'ContactSave', 
           name: 'ContactSave', 
           text:'Save', 
           action:'save', 
           width:'100', 
           iconCls:'icon-save' 
          }, 
          { 
           xtype:'button', 
           id: 'ContactDelete', 
           name: 'ContactDelete', 
           text:'Delete', 
           action:'delete', 
           width:'100', 
           iconCls:'icon-delete' 
          }, 
          { xtype: 'tbfill' }, 
          { 

           xtype:'button', 
           id: 'ContactCreate', 
           name: 'ContactCreate', 
           text:'Create', 
           action:'create', 
           width:'100', 
           iconCls:'icon-add' 

          } 


         ] 
        } 
       ], 
+0

감사합니다. 생명의 은인입니다. : – bldoron

+0

당신은 또한 당신의 tabpanel.items이를 추가 할 수 있습니다 보인다 { \t tabConfig : { \t \t 위해 xtype : 'tbfill' \t} } – Adam