Treeview Docs

Added Treeview docs
Improved some stuff in the treeview object
This commit is contained in:
Robert Jelic
2023-05-01 14:56:16 +02:00
parent f2eacf4a82
commit 6bab574e8a
23 changed files with 786 additions and 1 deletions

View File

@@ -0,0 +1,28 @@
## getRoot
### Description
Retrieves the root node of the Treeview object.
### Returns
1. `node` The root node of the Treeview object
### Usage
* Creates a Treeview and retrieves its root node:
```lua
local basalt = require("basalt")
local mainFrame = basalt.createFrame()
local treeview = mainFrame:addTreeview()
local rootNode = treeview:getRoot()
basalt.debug("Root node:", rootNode)
basalt.autoUpdate()
```
In this example, a Treeview object is created and added to the mainFrame. The `getRoot` method is used to retrieve the root node of the Treeview object.