Add Toolbar Button

Example XUL overlay file:

<?xml version="1.0"?>
<?xml-stylesheet href="chrome://demo/skin/overlay.css" type="text/css" ?>

<overlay id="messengerWindow" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
  <script type="application/x-javascript" src="overlay.js" />
  <toolbarpalette id="MailToolbarPalette">
    <toolbarbutton id="demo-button"
      class="demo-button toolbarbutton-1"
      label="Demo"
      type="button"
      oncommand="Demo.load();"
      />
  </toolbarpalette>
</overlay>

Add this to the css file you referenced in your xul file:

#demo-button, [place="palette"] > #demo-button {
  list-style-image: url("chrome://demo/skin/icon.png") !important;
}

Document Tags and Contributors

Contributors to this page: wbamberg, One
Last updated by: wbamberg,