DEFINE TREE
  

Creates a tree control.

SYNTAX

DEFINE TREE <ControlName>
[ID <
nId>]
[ OF, PARENT, DIALOG> <
ParentWindowName> ]
AT <
nRow> ,<nCol>
[ WIDTH<
nWidth> ]
[ HEIGHT<
nHeight> ]
[ VALUE <
nValue> ]
[ FONT <
cFontname> SIZE <nFonSize> ]
[ BOLD ] [ ITALIC ] [ UNDERLINE ] [ STRIKEOUT ]
[ BACKCOLOR <
BackColor> ]
[ FONTCOLOR <
FontColor> ]
[ LINECOLOR <
aLineColor> ]
[ INDENT <
nIndent> ]
[ ITEMHEIGHT <
nItemHeight>]
[ TOOLTIP <
cToolTipText> ]
[ ON GOTFOCUS <
OnGotFocusProcedur> | <bBlock> ]
[ ON CHANGE <
OnChangeProcedure> | <bBlock> ]
[ ON LOSTFOCUS <
OnLostFocusProcedure> | <bBlock> ]]
[ ON DBLCLICK <
OnDblClickProcedure> | <bBlock> ]
[ BREAK ]
[ NODEIMAGES <
aImgNode> [ ITEMIMAGES <aImgItem> ] [ NOROOTBUTTON ]]
[ ITEMIDS ]
[ HELPID <
nHelpId> ]


or in dialog:

REDEFINE TREE <ControlName>
ID <
nId>
[ OF, PARENT, DIALOG> <
ParentWindowName> ]
[ VALUE <
nValue> ]
[ FONT <
cFontname> SIZE <nFonSize> ]
[ BOLD ] [ ITALIC ] [ UNDERLINE ] [ STRIKEOUT ]
[ BACKCOLOR <
BackColor> ]
[ FONTCOLOR <
FontColor> ]
[ LINECOLOR <
aLineColor> ]
[ INDENT <
nIndent> ]
[ ITEMHEIGHT <
nItemHeight>]
[ TOOLTIP <
cToolTipText> ]
[ ON GOTFOCUS <
OnGotFocusProcedur> | <bBlock> ]
[ ON CHANGE <
OnChangeProcedure> | <bBlock> ]
[ ON LOSTFOCUS <
OnLostFocusProcedure> | <bBlock> ]]
[ ON DBLCLICK <
OnDblClickProcedure> | <bBlock> ]
[ BREAK ]
[ NODEIMAGES <
aImgNode> [ ITEMIMAGES <aImgItem> ] [ NOROOTBUTTON ]]
[ ITEMIDS ]
[ HELPID <
nHelpId> ]

...
...

[ NODE <cNodeCaption> ] [ IMAGES <aImage> ] [ ID <nItemId> ]
...

TREEITEM <cTreeItemCaption> [ IMAGES <aImage> ] [ ID <nItemId> ]

...

[ END NODE ]
...
...

END TREE


SPLITBOX VERSION

DEFINE TREE <ControlName>
[ OF | PARENT <
ParentWindowName> ]
[ WIDTH<
nWidth> ]
[ HEIGHT<
nHeight> ]
[ VALUE <
nValue> ]
[ FONT <
cFontname> SIZE <nFonSize> ]
[ BOLD ] [ ITALIC ] [ UNDERLINE ] [ STRIKEOUT ]
[ BACKCOLOR <
BackColor> ]
[ FONTCOLOR <
FontColor> ]
[ LINECOLOR <
aLineColor> ]
[ INDENT <
nIndent> ]
[ ITEMHEIGHT <
nItemHeight>]
[ TOOLTIP <
cToolTipText> ]
[ ON GOTFOCUS <
OnGotFocusProcedur> | <bBlock> ]
[ ON CHANGE <
OnChangeProcedure> | <bBlock> ]
[ ON LOSTFOCUS <
OnLostFocusProcedure> | <bBlock> ]]
[ ON DBLCLICK <
OnDblClickProcedure> | <bBlock> ]
[ NODEIMAGES <
aImgNode> [ ITEMIMAGES <aImgItem> ] [ NOROOTBUTTON ]]
[ ITEMIDS ]

[ HELPID <nHelpId> ]
[ BREAK ]

TREE PROPERTIES:

·   Value
Set / Gets Tree value.
·   Enabled
Set / Gets enabled state of a Tree control
·   Visible
Set / Gets visible a Tree control.
·   Item ( nItemIndex | ItemId )
Set / Gets item text in a Tree
·   ItemCount (R)
Get item count in a Tree
·   Row
Set / Gets row position of a Tree control.
·   Col
Set / Gets column position of a Tree control.
·   Width
Set / Gets width of a Tree control.
·   Height
Set / Gets height of a Tree control.
·   FontName
Set / Gets Tree control's font name.
·   FontSize
Set / Gets Tree control's font size.
·   FontBold
Set / Gets Tree control's font bold property
·   FontItalic
Set / Gets Tree control's font italic property
Set / Gets Tree control's font underline property
Set / Gets Tree control's font strikeout property
·   FontColor
Set / Gets the foreground color for text within the Tree
·   BackColor
Set / Gets the background color for text within the Tree
·   ToolTip
Set / Gets Tree control's tooltip text.
·   Cargo
Set / Gets user property 'Cargo' for Tree control
·   Name (R)
Retrieves the name of a Tree control.
·   Parent (D)
Set the name as character identifier of the parent window.
·   HelpId (D)
Set the numeric help topic identifier of the control.
·   LineColor 
Sets the line color for the ident
·   Indent (D)
Sets a value of ident of a Tree control
·   ItemHeight (D)
Sets item height of a Tree control
·   NodeImages (D)
Sets the image displayed for the node
·   ItemImages (D)
Sets the image for the Tree Item
·   Break (D)
Control passes to the statement that follows the terminated statement.

EVENTS

·   OnGotFocus
An action to be performed when getting the focus
·   OnChange
An action to be performed when generic changing of the control
An action to be performed when losing the focus.
·   OnDblClick
An action to be performed when Double Left clicking.

METHODS:

·   Show
Shows a Tree control
·   Hide
Hides a Tree control
·   AddItem( cItemText , nParentItemIndex | nParentItemId  )
Add a new item to a Tree control
·   DeleteItem( nItemIndex | nItemId )
Deletes an item from a Tree control
Deletes all items from a Tree control
·   Expand( nItemIndex | nItemId )
Expand control Tree.
·   Collapse( nItemIndex | nItemId )
Collapse control Tree
·   SetFocus
Gives the focus to a Tree control
·   Release
Releases a Tree control from memory
Update enables for Tree control
Update disables for Tree control
·   SaveAs
Save a Tree control as BitMap file.

When ITEMIDS clause is specified, you can assign a numeric ID (ID clause) to tree items and nodes. That way, all tree properties and methods will work using these id's instead item position.

EXAMPLE:

See demo in :
\Samples\Basic\Tree