Fit Image Inside Ext.Panel
Posted by admin on
October 4, 2012
When using an Ext.Image and putting it inside an Ext.Panel, you have to specify a width and height in order for it to appear. If you do not, then it becomes blank.
There is a workaround for this. Instead of using an Ext.Image or xtype image, put the image inside another Ext.Panel and use the IMG HTML source tag in it with a special CSS style attribute included.
{ xtype: 'panel', html: '<img src="touch/resources/images/myimage.jpg" style="max-width:100%;"/>' },
While this may not work in Internet Explorer browser and possibly so with Windows Phone, if your target is only Android and/or iOS, then this should be no problem at all. It should work.
Donations appreciated. Every little $ helps. Or click Google +1.









