PDA

View Full Version : access panel HTML and setting css on that HTML



gkatz
5 Dec 2010, 1:19 AM
Hi;
I have a panel with HTML that includes a single image. (html: '<img src="some_path"></img>').
I want to set the width of the image.
currently, I perform something like:

var Elem = this.myPanel.getEl().first();
Elem.dom.childNodes[0].width = my_new_width;it works but its not very elegant. is there a 'sencha' way of doing this?
thanks

evant
5 Dec 2010, 5:05 PM
panel.getEl().child('img').setWidth(100);