I have created a panel with items and I also want to add an image to it, here is the code. (Later I add this panel to a new window).
var frmCar = Ext.create('Ext.form.Panel',{
bodyPadding: 5,
frame : true,
items :[
{
xtype : 'textfield',
fieldLabel : 'Number: ',
name : 'number'
},,
{
xtype : 'textfield',
fieldLabel : 'Model: ',
name : 'model'
},{
xtype : 'textfield',
fieldLabel : 'Image path: ',
name : 'image'
},
{ xtype: 'image',
width: 200,
height: 400,
src: 'c:/image1.jpg'
}
]
});
The panel shows all elements - but not the image, what am I doing wrong? Also I want to let user enter image path - do I then have to replace single path separators with double? e.g. / to this // ?