2012-05-15 2 views
2

에 공개를 추가나는이 같은 FIELDSET 가지고 FIELDSET 필드

Ext.define('admin.view.BuzzEditForm', { 
    extend: 'Ext.form.Panel', 
    requires: ['Ext.form.FieldSet','Ext.Img'], 
    id: 'editorPanel', 
    xtype: 'buzzEditForm', 
    config: { 
     /* modal: true, 
     hideOnMaskTap: false, 
     centered: true, 
     width: 500, 
     scrollable: false,*/ 
     items: [{ 
      xtype: 'fieldset', 
      items: [ 
       { 
        xtype: 'textfield', 
        name: 'keyword', 
        label: 'Mots clés' 
       }, 
       { 
        xtype: 'textfield', 
        name: 'title', 
        label: 'Titre' 
       }, 
       { 
        id: 'editorPanelvisual', 
        xtype: 'field', 
        label: 'Visuel actuel', 
        component: { 
         xtype: 'image', 
         src: '', 
         height: 200 
        } 
       }, 
       { 
        xtype: 'textfield', 
        name: 'visual', 
        label: 'Visuel' 
       } 
      ] 
     }] 
    } 
}); 

을 그리고 난 내 editorPanelvisual 필드에 단추를 추가하고 싶습니다. 내가 어떻게 할 수 있니?

답변

2

Ext.data.Field에 대해 당신에게 더 깊은 이해가 필요합니다

component 입력 필드에 기본적으로 특별한 설정이다가,이 {xtype: "input", type: "text"}로 설정되어, 즉,이 해결 방법의 핵심입니다. flex 설정

textfieldbutton 대 폭을 확장하면이 시도 :

{ 
    id: 'editorPanelvisual', 
    xtype: 'field', 
    component: { 
     xtype: 'container', 
     layout: 'hbox', 
     items: [ 
     { 
     xtype: 'textfield', 
     flex: 3, 
     }, 
     { 
     xtype: 'button', 
     flex: 1, 
     text: 'test' 
     } 
     ]}, 
}, 
관련 문제