Visit Mozilla.org

XUL:treecell

From MDC

« 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



[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

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.

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 of an RDF resource
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: image URL
Set this to the URL 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.

[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, treeitem, treerow and treeseparator.