OnSwipe redirect code

Wednesday, February 4, 2009

Image for a statusbar panel in a firefox extension

I was working on a firefox extension which, like many other extensions, was adding a small button to the status bar. Doing this is very clearly explained here in : this MDC tutorial

I followed the instructions properly but to my surprise I did not see the image on the status bar, but just a square box in the defualt chrome color. I tried forums/web search and the IRC too, but no help. Then I read the statusbarpanel reference page - statusbarpanel - MDC -- completely and it appears that for the image to show up the statusbarpanel has to be of a specific class called : "statusbarpanel-iconic". I just added that and it worked. :-)

Here is my code

<statusbar id="status-bar">
<statusbarpanel id="graph_status_bar_panel"
class="statusbarpanel-iconic" onclick="toggleGraphPanel(event)"
tooltiptext="View Graph Panel" />

1 comment:

  1. thanks. the docs didn't make this obvious and i too was stuck on this for a bit.