« XUL Reference home [ Examples | Attributes | Properties | Methods | Related ]

A single cell in a tree. This element should be placed inside a treerow. You can set the text for the cell using the label attribute.

More information is available in the XUL tutorial.

Attributes
editable, label, mode, properties, ref, src, value

Attributes

editable
Type: boolean
Allows the contents of individual cells in the column to be changed, especially useful when <treecol type="checkbox">. Also useful for disabling editing of individual treecells. When the user double-clicks an editable cell, a text field appears in which the user can edit the contents of the cell.
The tree and treecol must also be marked as editable in order for this to work. The tree must be a content tree for this to work on treecells.
label
Type: string
The label that will appear on the element. If this is left out, no text appears. For an editable menuitem element the value of this attribute is copied to the menulist.value property upon user selection of the menuitem.
mode
Type: one of the values below
For columns that are progress meters, this determines the type of progress meter to use.
none
No progress meter is displayed. The cell text is displayed instead.
normal
The cell uses its value attribute to determine the amount of the bar that is filled in.
undetermined
The progressmeter is indeterminate.
properties
Type: space-separated list of property names
Sets the properties of the element, which can be used to style the element. For more information, see Styling a Tree.
ref
Type: URI
For template-generated elements, this attribute is used to specify the root RDF node where content generation begins. This will correspond to the value of an about attribute on an RDF container. This attribute should be placed alongside the datasources attribute.
src
Type: URI
Set this to the URI of an image to appear in the tree cell. If this attribute is left out, no image appears. You can have both an image and a label.
value
Type: string
The string attribute allows you to associate a data value with an element. It is not used for any specific purpose, but you can access it with a script for your own use. Be aware, however, that some elements, such as textbox will display the value visually, so in order to merely associate data with an element, you could 1) Use another attribute like "value2" or "data-myAtt" (as in the HTML5 draft), as XUL does not require validation (less future-proof); 2) Use setAttributeNS() to put custom attributes in a non-XUL namespace (serializable and future-proof); 3) Use setUserData() (future-proof and clean, but not easily serializable). For user editable menulist elements, the contents, as visible to the user, are read and set using the Menulist.value syntax. For those elements, setAttribute("value", myValue) and getAttribute("value") do not access or affect the contents displayed to the user.

 

Properties

Inherited Properties
align, , allowEvents, , boxObject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width

Methods

Inherited Methods
addEventListener(), appendChild(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), hasChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), removeChild(), removeEventListener(), replaceChild(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData

Elements
tree, treecols, treecol, treechildren, treeitem, treerow and treeseparator.