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.
Note here that if you add a value attribute to the text box, this will display, but if a user clicks on it to add some text of their own, their text will be appended to the end of the string you set the value to rather than replacing it. Without JavaScript to do something with the input it won’t do much anyway, but it’s worth bearing in mind for now. Like HTML input boxes, XUL text boxes can also be one of several types of text boxes; password, autocomplete, or unusually, timed. So adding the following code would add a text field that displayed stars when input was entered:
<textbox id="pass" type="password"/>
The syntax for the other types is very similar.
Looking at your window, the various controls may seem a little random; we know what the controls are for because of the labels, but if the labels contained the values of the radio buttons for example, you would need some kind of heading or title to show the user what they were for. Simple lines of text can be added to the window using either the <description value= ”yourtexthere”>, or the <caption label= ”yourtexthere”/> syntax. The main difference between these is that captions are automatically indented slightly. Additionally, you can specify a control label that is tied to the control using the id attribute of the control and the control attribute of the label: