Tree object
The Tree widget displays a hierarchical list of expandable items
| Event | Description |
|---|---|
| Tree:onChange() | Event fired when items in the Tree have been modified |
| Tree:onClick() | Event occurs when the user clicks on the Tree |
| Tree:onContext() | Event fired when a right click occured on the Tree |
| Tree:onCreate() | Event fired when Tree has just been created |
| Tree:onDoubleClick() | Event fired when the user double-clicks on an item in the Tree |
| Tree:onDrop() | Event fired when the Tree received a drag and drop content |
| Tree:onDropItem() | Event fired when an item is dropped on a Tree |
| Tree:onHide() | Event fired when the Tree is hidden |
| Tree:onHover() | Event fired when the user moves the mouse pointer over the Tree |
| Tree:onLeave() | Event fired when the mouse cursor leaves the Tree |
| Tree:onMouseDown() | Event fired when the user presses a mouse button over the Tree |
| Tree:onMouseUp() | Event fired when the user releases a mouse button over the Tree |
| Tree:onSelect() | Event fired when the user selects an item in the Tree |
| Tree:onShow() | Event fired when the Tree is shown |
| Property | Description | Access | Type |
|---|---|---|---|
| Tree.align | Align the Tree relative to its parent | readwrite | boolean |
| Tree.allowdrop | Controls whether the Tree is a drag and drop target | readwrite | boolean |
| Tree.border | Controls whether the Tree border is visible | readwrite | boolean |
| Tree.count | Get the count of items in the Tree | readonly | number |
| Tree.cursor | Get/set the image of the mouse cursor as it hovers over the Tree | readwrite | string |
| Tree.enabled | Controls whether the Tree responds to mouse and other events | readwrite | boolean |
| Tree.font | Get/set the Tree font | readwrite | string |
| Tree.fontsize | Get/set the Tree font size | readwrite | number |
| Tree.fontstyle | Get/set the Tree font style | readwrite | table |
| Tree.height | Get/set the Tree's height | readwrite | number |
| Tree.items | Get/set the Tree items | readonly | table |
| Tree.parent | Get the Tree's parent widget | readonly | |
| Tree.readonly | Controls whether the Tree is editable by the user | readwrite | boolean |
| Tree.selected | Get/set the selected Tree item | readonly | |
| Tree.style | Get/set the Tree style | readwrite | string |
| Tree.visible | Controls whether the Tree appears on screen | readwrite | boolean |
| Tree.width | Get/set the Tree's width | readwrite | number |
| Tree.x | Get/set the Tree's horizontal position | readwrite | number |
| Tree.y | Get/set the Tree's vertical position | readwrite | number |
| Methods | Description | Return value |
|---|---|---|
| Tree:add() | Add one or more items to the Tree | |
| Tree:center() | Centers the Tree on the parent widget | - |
| Tree:clear() | Remove all items from the Tree | - |
| Tree:constructor() | Tree object constructor | |
| Tree:hide() | Hides the Tree | - |
| Tree:remove() | Remove an item from the Tree | - |
| Tree:show() | Shows the Tree | - |
| Tree:sort() | Sort the Tree | - |
| Tree:toback() | Puts the widget to the back | - |
| Tree:tofront() | Brings the widget in front | - |