Specifications
User Interfaces for Extensions 39
MM:TREECOLUMN tags have the following attributes:
For readability,
TREECOLUMN tags should follow immediately after the MM:TreeControl tag, as
shown in the following example:
<MM:TREECONTROL name="tree1">
<MM:TREECOLUMN name="Column1" width="100" state="visible">
<MM:TREECOLUMN name="Column2" width="80" state="visible">
...
</MM:TREECONTROL>
The MM:TREENODE attributes are described in the following table:
The following example creates a tree control:
<mm:treecontrol name="CtrlName" [size=N] [style="[width:#px];[height:#px]"]>
<mm:treecolumn name="Column1" value="Items">
<mm:treenode value="Item1" selected></mm:treenode>
<mm:treenode value="Item2|Item3" expanded></mm:treenode>
<mm:treenode value="Item4|Item5"></mm:treenode>
</mm:treecolumn>
</mm:treenode>
</mm:treecontrol>
Manipulating content within a tree control
Tree controls and the nodes within them are implemented as HTML tags. They are parsed by
Dreamweaver and stored in the document tree. These tags can be manipulated in the same way as
any other document node. For more information on
dom functions and methods, see “The
Dreamweaver Document Object Model” on page 41.
Attribute Name Description
name Name of the column
value String to appear in column header
width Width of the column in pixels (percentage not supported);
default is 100
align Optional. Specifies whether the text in the column should be
aligned left, right, or center; default is left
state Specifies whether the column is visible or hidden
Attribute Name Description
name Name of the node
value Contains the content for the given node. For more than one column, this is a pipe-
delimited string. To specify an empty column, place a single space character before
the pipe
(|).
expanded An empty attribute that specifies the node is expanded by default
selected You can select multiple nodes by setting this attribute on more than one tree node, if
the tree has a MULTIPLE attribute.
icon Optional. The index of built-in icon to use, starting with 0, as follows:
0 = no icon
1 = DW document icon
2 = Multidocument icon