PDA

View Full Version : Putting an image on a Panel with a background image.



fsjay
10 Jun 2011, 10:00 AM
Hi

I am trying to put an image in a Panel as we all have a background repeating image.

My problem is that in the iPhone, the image for my panel in my card is not displaying initially, it only displays when I got to another card and then come back to it.



WashingtonPlaces.views.Homecard = Ext.extend(Ext.Panel, {
title: "home",
iconCls: "home",
styleHtmlContent: true,
style: "background-image:url('img/georgetracker-bkg.jpg'); background-repeat:repeat-x;",
html: '<img src=\"img/george-tracker-home.png\">',
initComponent: function () {
Ext.apply(this, {
dockedItems: [{
xtype: "toolbar",
title: "GEOrge Tracker"
}]
});
WashingtonPlaces.views.Homecard.superclass.initComponent.apply(this, arguments);
}
});

Ext.reg('homecard', WashingtonPlaces.views.Homecard);


Any ideas?

Thanks in advance.

bclinton
11 Jun 2011, 10:14 PM
I don't have an iPhone so I can't test, but have you tried putting that style definition into a class in a .css file and using "cls:" instead?