i’m creating an application in Ext JS 4 and i’m stuck because i need a class containing an image to use into a form or a fieldset (like a regular textfield); moreover the image will change depending on the value passed to the form.
Something like an imagefield:
Ext.define('Properties', {
extend : 'Ext.form.Panel',
alias : 'properties',
bodyPadding: 5,
// The fields
defaultType: 'textfield',
items: [{
fieldLabel: 'Device Name',
name: 'deviceName'
},
{
xtype:'imagefield',
fieldLabel: 'Status',
name: 'status'
}
],.......
I’ve tried to extend Ext.form.field.Base without any success.
Somebody can help me ?
Thank you.
There is
Ext.Imageclass you can use. But you probably would need to wrap it into some kind of border and add logic to load specific image in a run-time. If you want I can post some code later today.Update: I did something like that: