Question

I have a form panel..in which I am trying to add an image...the image block appears but the image is not getting loaded..resizing the image block works fine..Here is my code which I am calling from a html file.. Can someone help me with this??

 Ext.application({
    name : 'hello',
    launch : function() {
        Ext.create('Ext.form.Panel', {
            title : 'Create Catalog',
            defaultType : 'textfield',
            items : [ {
                fieldLabel : 'Name',
                name : 'name',
                anchor : '100%',
                allowBlank : false
            },{
                xtype : 'imagefield',
                fieldLabel : 'Image Here',
                src : 'i1.jpg',
                width : 50,
                height : 25
            }
            ],
                renderTo : Ext.getBody()
        });
    }
});
Was it helpful?

Solution

It works now...xtype should be image.

{
xtype: 'image',
fieldLabel: 'Image Here',
src: 'i2.png',
width: 50,
    height: 50
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top