View Full Version : Images do not load on first attempt

17 Jul 2013, 7:19 AM
I have a list of objects that have a label and an image. To set each image and label, I run thru a loop like this:

var hWareImg = Ext.create('HardwareImage',{
name: demoData.data.name,
imgSrc: demoData.data.hardwareImage});

demoList is just a panel.

The first time I access this page, everything is being set, but the images are not showing. If I leave the page and come back, the images finally appear. I've tried calling a doLayout on hWareImg after it is added and I've also tried calling demoList.doLayout() after the loop has finished.

Is there something else I should be doing to redraw the page?

17 Jul 2013, 10:24 AM
Also, just found that if I resize the screen, the images will appear.

18 Jul 2013, 5:15 AM
I figured it out. The image needed to be created on the fly with a height and width specified.