readOnly : true 可以的亲自试过,下面是我测试的代码。
Ext.onReady(function() {
var FieldContainer = Ext.create('Ext.form.FieldContainer', {
乱哗 items : [{
xtype : 'fieldcontainer',
layout : 'hbox',
fieldLabel : 'Size',
defaults : {
flex : 1
},
defaultType : 'radiofield',
items : [{
boxLabel : 'M',
name : 'size',
inputValue : 'm',
readOnly : true,
id : 'radio1'
}, {
boxLabel : 'L',
name : 'size',
inputValue : 'l',
哗者行 readOnly : true,
id : 'radio2'
}, {
boxLabel : 'XL',
name : 'size',
inputValue : 'xl',
readOnly : true,
id : 'radio3'
}]
}]
});
Ext.create('Ext.container.Viewport', {
layout : 'vbox',
items : [FieldContainer]
});
});
如果你的 readOnly 没起作用,就说明写错地方了。要不发一嫌毁下你的代码。
{
xtype:'radio',
fieldLabel : "www",
disabled :true
}
radio设置不基高可编辑只能用disabled:true,它的效果就是变灰,不可选中
如果你不非得不想变灰团森,那么请重写塌锋亩ext-all.css或者自己加个弄个新的样式
editabled:false 试试这个看 不敢肯定