[Dojo-interest] Image in TitlePane label?

Thomas Wolf tw at wsf.at
Sat Feb 24 13:28:23 MST 2007

Sean wrote:
> This may be a dumb question but I can't find it answered anywhere...
> can I display an image as part of the label of a TitlePane widget?
> Something similar to the FloatingPane's iconSrc attr

According to TitlePane.js there is currently no way to set
this via markup. You can do it from script using setLabel():

var tp=dojo.widget.getWidgetById("myTitlePane");
tp.setLabel("<img src='xxx.jpg'>");

The parameter for setLabel() is assigned as innerHTNL to the
labelNode of the TitlePane so you can use whatever html you
like for this.

If you need it to be done via markup, I think you'll have to
patch/subclass/extend the widget...


> ------------------------------------------------------------------------
> _______________________________________________
> Dojo FAQ: http://dojo.jot.com/FAQ
> Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
> Dojo-interest at dojotoolkit.org
> http://dojotoolkit.org/mailman/listinfo/dojo-interest

More information about the Dojo-interest mailing list