版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/inforstack/article/details/49866619
createEvent : function() {
var me = this;
me.groupPanel = Ext.create('Ext.form.Panel', {
title : 'RadioGroup Example',
width : 300,
height : 125,
items : [{
xtype : 'radiogroup',
fieldLabel : 'Two Columns',
columns : 2,
name : "group",
vertical : true,
items : [{
boxLabel : 'Item 1',
name : 'rb',
inputValue : '1'
}, {
boxLabel : 'Item 2',
name : 'rb',
inputValue : '2',
checked : true
}]
}]
});
return me.groupPanel;
},
addGroupItems : function(){
var me = this;
var group = me.groupPanel.query("radiogroup[name = 'group']")[0];
group.add(new Ext.form.field.Radio({ boxLabel: "123", name: 'rb', inputValue: "123" }));
}