Learn about XUL, a subset of XML used to describe user interfaces, that helps you to make rich user interfaces with nothing more complicated than a text editor. In the second part of this series, Dan Wellman covers implementing more kinds of buttons. He also begins talking about creating Menu Bars, Tooltips, and Status Bars.
The toolbar should reside within a toolbox and to make use of the functionality of the collapse/expand arrow (known as a grippy) at the far left of the toolbar, the id attribute should always be used with the <toolbar> element.
Those used to HTML will find the form-like elements of XUL very easy to get to grips with; XUL offers all of the standard form elements such as radio buttons, checkboxes, drop-down or combo boxes and text fields, which are known as controls. The following code illustrates the use of these controls:
<checkbox label="I am a checked checkbox!" checked="true"/> <checkbox label="I am also a checkbox but am not checked yet!"/> <radiogroup> <radio label="I am a selected radio button!" selected="true"/> <radio label="I am also a radio button but am not selected yet!"/> </radiogroup> <menulist> <menupopup> <menuitem label="I am a drop-down box selection!" /> <menuitem label="I am also a drop-down box selection!"/> </menupopup> </menulist> <textbox id="input"/>
This should be added below the existing button code, and upon execution, you will find these controls below your buttons.