2012-11-28 50 views
0

我在ExtJS的自定义项目添加到单选按钮,在ExtJS的

{ 
    xtype: 'radiogroup', 
    flex: 8, 
    vertical: true, 
    columns: 1, 
    labelWidth: 50, 
    id: 'radio_group_id', 
    fieldLabel: 'Group Label', 
    items: [{ 
     boxLabel: 'option 1', 
     name: 'rb-auto', 
     inputValue: 1, 
     checked: true 
    }, { 
     boxLabel: 'option 2', 
     name: 'rb-auto', 
     inputValue: 2 
    }, { 
     boxLabel: 'option 3', 
     name: 'rb-auto', 
     inputValue: 3, 
     // is this somehow possible 
     items:[{ 
      xtype:'numberfield', 
      // number field settings 
     }] 
    }, { 
     boxLabel: 'option 4', 
     name: 'rb-auto', 
     inputValue: 4 
    }, { 
     boxLabel: 'option 5', 
     name: 'rb-auto', 
     inputValue: 5 
    }] 
}, 

是它在某种程度上可以将数字字段旁边添加选项3,这样,当我选择单选按钮3它就会启用该单选按钮组?

或者我必须使用seaprate容器来将单独的数字字段与选项3对齐?

回答

4

例如,您可以将NumberField转换为单选按钮的boxLabelEl。另一种方法是创建两个列布局,并在第二列中放置标签和数字字段。

第一种方法的示例:http://jsfiddle.net/NsbyD/2/

相关问题