DEFINE TREE
Creates a Tree Control

 

 

 

      DEFINE TREE <ControlName>

            [ PARENT <ParentWindowName> ]

            ROW <nRow>

            COL <nCol>

            WIDTH <nWidth>

            HEIGHT <nHeight>

            [ VALUE <nValue> ]

            [ FONTNAME <cFontname> ]

            [ FONTSIZE <nFonSize> ]

            [ TOOLTIP <cToolTipText> ]

            [ ON GOTFOCUS <OnGotFocusProcedure> | <bBlock> ]

            [ ON CHANGE <OnChangeProcedure> | <bBlock> ]

            [ ON LOSTFOCUS <OnLostFocusProcedure> | <bBlock> ]

            [ ON DBLCLICK <OnDblClickProcedure> | <bBlock> ]

            [ BREAK <lValue> ]

            [ NODEIMAGES <aImgNode> ]

            [ ITEMIMAGES <aImgItem> ]

            [ ROOTBUTTON <lValue> ]

            [ ITEMIDS <lValue> ]

            [ HELPID <nHelpId> ]

            ...

            ...

            [ NODE <cNodeCaption> ]

                  [ IMAGES <aImage> ]

                  [ ID <nItemId> ]

                  ...

                  [ TREEITEM <cTreeItemCaption>

                        [ IMAGES <aImage> ]

                        [ ID <nItemId> ] ]

                        ...

            [ END NODE ]

            ...

            ...

      END TREE

 

Properties:

 

      - Value

      - Enabled

      - Visible

      - Row

      - Col

      - Width

      - Height

      - Item ( nItemIndex | ItemId )

      - ItemCount

      - FontName

      - FontSize

      - FontBold

      - FontItalic

      - FontUnderline

      - FontStrikeout

      - ToolTip

      - Name (R)

      - Break (D)

      - NodeImages (D)

      - ItemImages (D)

      - HelpId (D)

      - Parent (D)

      - RootButton (D)

 

      D: Available at control definition only

      R: Read-Only

 

Events:

 

      - OnGotFocus

      - OnChange

      - OnLostFocus

      - OnDblClick

 

Methods:

 

      - Show

      - Hide

      - AddItem ( cItemText , nParentItemIndex | nParentItemId )

      - DeleteItem ( nItemIndex | nItemId )

      - DeleteAllItems

      - Expand ( nItemIndex | nItemId )

      - Collapse ( nItemIndex | nItemId )

      - SetFocus

      - Release

 

      - 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.