Home arrow XML arrow Page 2 - An Introduction to XUL Part 2

Organizing Buttons - XML

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.

  1. An Introduction to XUL Part 2
  2. Organizing Buttons
  3. Changing Textbox Attributes
  4. Menu Bar and Interface
  5. Cleaning Up and Adding a Status Bar
  6. Using ToolTips and Progress Bars
By: Dan Wellman
Rating: starstarstarstarstar / 10
May 30, 2005

print this article



There is also an easily coded way of placing buttons automatically into a horizontal toolbar that sits near the top of the page:

  <toolbar id="tool1">
    <toolbarbutton label="Back"/>
    <toolbarbutton label="Forward"/>

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!"/>
  <radio label="I am a selected radio button!" selected="true"/>
  <radio label="I am also a radio button but am not selected yet!"/>
  <menuitem label="I am a drop-down box selection!" />
  <menuitem label="I am also a drop-down box selection!"/> 
<textbox id="input"/>

This should be added below the existing button code, and upon execution, you will find these controls below your buttons.

>>> More XML Articles          >>> More By Dan Wellman

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort


- Google Docs and Xpath Data Functions
- Flex Array Collection Sort and Filtering
- The Flex Tree Control
- Flex List Controls
- Working with Flex and Datagrids
- How to Set Up Podcasting and Vodcasting
- Creating an RSS Reader Application
- Building an RSS File
- An Introduction to XUL Part 6
- An Introduction to XUL Part 5
- An Introduction to XUL Part 4
- An Introduction to XUL Part 3
- An Introduction to XUL Part 2
- An Introduction to XUL Part 1
- XML Matters: Practical XML Data Design and M...

Developer Shed Affiliates


Dev Shed Tutorial Topics: