我有一组单选按钮。我无法将图像设置为放射场中的图标。这是我的代码:
items: [
{
icon: 'img/rag123a.',
name: 'rag',
id: 'rag1',
margin: '0 10 0 0'
}
]
我想要这样的东西:
发布于 2014-02-11 18:57:12
也许你想在无线电按钮的标签上显示图像?如果是,扭曲图像的一种方法是将其放入boxLabel中,如下面的jsfiddle http://jsfiddle.net/NUPD2/所示
*图标的来源是从本例中的icon#size=128复制的*
{
boxLabel: '<img src="url/to/image" width="20" height="20"/>',
name: 'size',
inputValue: 'l',
id: 'radio2'
}
发布于 2014-02-13 08:30:29
你可以试试这个:
{
xtype: 'radiogroup',
columnWidth: 1,
fieldLabel: 'Achat',
items: [
{
xtype: 'radiofield',
name: 'typeAchat',
boxLabel: '<img src="images/optique/glasses.png"/>',
checked: true,
inputValue: 'lunetteOptique'
},
{
xtype: 'radiofield',
name: 'typeAchat',
boxLabel: '<img src="images/optique/JustGlasse.png"/>',
inputValue: 'glasses'
},
...
]
},
https://stackoverflow.com/questions/21705894
复制相似问题