XUL Programmer's Reference Manual

<text>

Attributes Common Children
value  
id  
class  
for  
observes  

The <text> element provides a simple way to include text in your interface development. Many more complex XUL widgets, such as the menubutton, are created out of combinations of <text> widgets, <image> widgets, and others. value, the most commonly-used attribute on the <image>, is used to create the actual text in the widget:

<box>
  <text value="Meaningful text" />
</box>

The three buttons defined as child elements of the stack are interpolated into what looks like a single button.

 

value
Description
value is the main attribute for adding text to text widgets. 
Syntax
<text value="string" />
Example
<text value="drink me" />
...
Notes

At one point, the <text>string</text> construction was used to add text to this widget. This construction is obsolete.

 
 
 
for
Description
The for attribute indicates that the text of the <text> element is to be used in the construction of a different widget.
Syntax
<text value="string" for="id of another element />
Example
<text value="useful, reusable text" for="complicated_button_widge"/>
...
Notes

None.

 
 
 

 
Last updated: 8/10/00 Ian Oeschger