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.

TABLE OF CONTENTS:
  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
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

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

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

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.



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

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

XML ARTICLES

- 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: