XUL Programmer's Reference Manual
<menulist>
The <menulist> element is XUL's own <select> element. It provides a general widget for selecting subelements from an option list. The children of the menulist (analogous to the nested <option> elements in HTML 4.0) are contained in a menupopup. The canonical example for using menulists is as follows:
|
||||||||||||||||||||
value | ||||||||||||||||||||
Description
value is an optional attribute that specifies the string that appears initially in the selection box.Syntax <menulist value="default string">Example <menulist value="select type of automobile">Notes When you do not specify a value for the menulist, then the first child of the menulist's popup will be displayed.
|
||||||||||||||||||||
crop | ||||||||||||||||||||
Description
crop is an optional attribute for specifying which part of a menulist's text, if any, will be cropped if it is too large.Syntax <menulist crop="left| right | none" >Example Notes None.
|
||||||||||||||||||||
disabled | ||||||||||||||||||||
Description
disabled is an optional attribute for disabling the <menulist> element.Syntax <menulist disabled=" true | false">Example <menulist value="Select an Action" disabled="true">Notes When a menulist is disabled, the default value (set with the value attribute) appears, but the pull-down cannot be activated, and the actual subelements are not available.
|
||||||||||||||||||||
src | ||||||||||||||||||||
Description
src is an optional attribute for placing an image over the <menulist> element.Syntax <menulist src="pointer to graphic" >Example <menulist value="Cars" src="car1.gif" >Notes None.
| ||||||||||||||||||||
selecteditem | ||||||||||||||||||||
Description
selecteditem is an optional attribute that specifies a child node that is selected in the <menulist>.Syntax <menulist selecteditem="id of selected child node" >Example Notes<menulist value="Cars" selecteditem="buick" > <menupopup> <menuitem id="gm" value="general motors" /> <menuitem id="buick" value="Buick" /> <menuitem id="dodge" value="Dodge" /> </menupopup> </menulist> None.
Last updated: 2/18/01 Ian Oeschger
|