Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1001087
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T07:36:49+00:00 2026-05-16T07:36:49+00:00

In XUL you can use create a status bar panel icon, similar to the

  • 0

In XUL you can use create a status bar panel icon, similar to the ones used by Firebug and Greasemonkey, with the <statusbarpanel> tag. If you set the right class, you can throw a <menupop> inside, and then have a pop-up menu when the user clicks on the icon, like so …

<statusbarpanel class="statusbarpanel-menu-iconic"
        src="chrome://YourExtension/content/icon.png">
    <menupopup>
        <menuitem label="whatever" oncommand="doSomething();">
        <menuitem label="whatever else" oncommand="doSomethingElse();">
    </menupopup>
</statusbarpanel>

Now, with other pop-up menus, you can nest a series of menus using the menu tag:

<statusbarpanel class="statusbarpanel-menu-iconic"
        src="chrome://YourExtension/content/icon.png">
    <menu value="Old">
        <menupopup>
            <menuitem label="whatever" oncommand="doSomething();">
            <menuitem label="whatever else" oncommand="doSomethingElse();">
        </menupopup>
    </menu>
    <menu value="New>
        <menupopup>
            <menuitem label="yet another" oncommand="doYetAnotherSomething();">
        </menupopup>
    </menu>
</statusbarpanel>

but the above code doesn’t actually work, because <statusbarpanel> won’t allow a <menu> child (well, it will allow it, but not create the desired effect).

So, what I was wondering was … is there any way I can make a status bar panel icon-triggered menu with multiple layers of menu items?

* EDIT *
Since I can’t post this in the comment to the answer (and get syntax coloring and such), here’s what finally worked for me (thanks Sathish!):

<statusbarpanel class="statusbarpanel-menu-iconic"
        src="chrome://YourExtension/content/icon.png" popup="stausBarPanelMenu">
</statusbarpanel>
<popup id="statusBarPanelMenu" position="start_before">
    <menu value="Old">
        <menupopup>
            <menuitem label="whatever" oncommand="doSomething();">
            <menuitem label="whatever else" oncommand="doSomethingElse();">
        </menupopup>
    </menu>
    <menu value="New>
        <menupopup>
            <menuitem label="yet another" oncommand="doYetAnotherSomething();">
        </menupopup>
    </menu>
</popop>

Oh, and as a side note to any XUL devs who might read this: you should really eliminate the “menupopup inside a statusbarpanel” style of pop-up. The style that answered this question is just as easy to learn/use, significantly more powerful, and it relies on the same popup mechanisms that can be used with the other XUL elements. This whole “menupopup inside a statusbarpanel” this is just a confusing, un-needed, anomaly.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T07:36:50+00:00Added an answer on May 16, 2026 at 7:36 am

    Try this:

    1. create a popup element like this:
      <popup ... >
      <menu ... >
      <menupopup ... >
      <menuitem ... >
      </menupopup ... >
      </menu>
      </popup>

    2. assign the id of popup element to the oncontextmenu attribute or show it dynamically using onclick event of the statusbarpanel element.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can I use LESS with Xul? Does anyone already used them together?
I'm trying to figure out how to use a preference (the ones you can
I've used XUL to create a toolbarbutton. When I click on this button, I
Can anybody recommend a good graphic WYSIWYG editor for XUL?
I have a xul:panel on my firefox extension. I give the position to display
I want to Embed SVG into XUL. I tried to use the this tutorial
I try to create some li elements in my XUL Application. Theres only the
I wanna get the actual width of a <xul:hbox> element for presentation. How can
I am trying to use Midas through the element of XUL following the instructions
I am working on Binary component for Firefox 5. But I can't find xul

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.