Visit Mozilla.org

XUL:treeitem

From MDC

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

A treeitem should be placed inside a treechildren element and should contain treerow elements. The treeitem can be clicked by the user to select the row of the tree. The treeitem contains a single row and all of what appear to the user as that row's descendants.

In a template condition, you should use a treeitem instead of a content element when the dont-build-content flag is specified. Set the uri attribute to the variable name to bind to a content node during matching.

More information is available in the XUL tutorial.

Attributes
container, empty, label, open, uri

[edit] Examples

(example needed)

[edit] Attributes

Inherited from XUL element
align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortDirection, sortResource, sortResource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width

container
Type: boolean
Set to true if the element is to act as a container which can have child elements. This would be used for folders. This will be set by the template builder as needed.

empty
Type: boolean
Set to true if the element is a container that contains no children. This will be set by the template builder as needed.

label
Type: string
For trees with only a single column, the label may be placed directly on the treeitem without the need for a treerow and treecell inside.

open
Type: boolean
For the menu type buttons, the open attribute is set to true when the menu is open. The open attribute is not present if the menu is closed.

uri
Type: string
For template-generated content, the attribute should be placed on the element where content generation should begin. Thus, it should be placed on an element that is a descendant of a template. The value should be set to rdf:*.
Elements that appear inside the element with the attribute will be repeated for each node in the RDF datasource. Elements outside will appear only once.


[edit] Properties

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

Inherited from DOM element
attributes, childNodes, cloneNode, firstChild, lastChild, localName, namespaceURI, nextSibling, nodeName, nodeType, nodeValue, ownerDocument, parentNode, prefix, previousSibling, tagName

[edit] Methods

Inherited from XUL element
blur, click, doCommand, focus, getElementsByAttribute

Inherited from DOM element
addEventListener, appendChild, dispatchEvent, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, hasAttribute, hasAttributeNS, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeAttribute, removeAttributeNode, removeAttributeNS, removeChild, removeEventListener, replaceChild, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS

[edit] Related

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