You are currently viewing a snapshot of www.mozilla.org taken on April 21, 2008. Most of this content is highly out of date (some pages haven't been updated since the project began in 1998) and exists for historical purposes only. If there are any pages on this archive site that you think should be added back to www.mozilla.org, please file a bug.


<< XULNotes Author: Ian Oeschger Other Docs: XUL Reference

XUL Widget Cheatsheet

ElementDisplay
<menu value="Menu Widget">
  <menupopup>
    <menuitem value="foo" />
    <menuitem value="shoo" />
    <menu value="sub">
      <menupopup>
        <menuitem value="subitem" />
      </menupopup>
    </menu>
  </menupopup>
</menu>
<menulist value="Menulist Element">
  <menupopup>
    <menuitem value="foo" />
    <menuitem value="shoo" />
    <menuitem value="boo" />
  </menupopup>
</menulist>
 
<menubutton src="back.gif">
  <menupopup>
    <menuitem value="foo" />
    <menuitem value="shoo" />
    <menuitem value="boo" />
  </menupopup>
</menubutton>
<checkbox value="Books" />
<checkbox value="Labrador Retriever" />
<checkbox class="iconic" src="TB_Location.gif" />
<radiogroup>
  <radio value="de Kooning" />
  <radio value="Pollock" checked="true" />
  <radio value="Kline" />
</radiogroup>
<textfield value="Fill in here" />
<textfield
  value="I am a textarea now"   multiline="true" />
<button value="Click Me" />
<button
  class="dialog"
  value="No, really. Click me." />
<tabcontrol align="vertical" style="background-color: lightgrey;" >
  <tabbox align="horizontal">
    <tab value="Tab One" />
    <tab value="Tab Two" />
  </tabbox>

  <tabpanel flex="100%">
    <box><text value="View One" /></box>
    <box><text value="View Two" /></box>
  </tabpanel>
</tabcontrol>
<scrollbar orient="vertical"
  curpos="50"
  pageIncrement="20"
  increment="5"
  flex="100">
  <scrollbarbutton type="decrement" />
  <slider>
    <thumb value="Thumb" flex="0%" />
  </slider>
  <scrollbarbutton type="increment" />
</scrollbar>