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,29 @@
## isSelectionColorActive
### Description
Checks if the selection color is active for the Treeview object.
### Returns
1. `boolean` A boolean value indicating whether the selection color is active (`true`) or not (`false`).
### Usage
* Creates a Treeview, sets the selection colors, and checks if the selection color is active:
```lua
local basalt = require("basalt")
local mainFrame = basalt.createFrame()
local treeview = mainFrame:addTreeview()
:setSelectionColor(colors.blue, colors.white)
local active = treeview:isSelectionColorActive()
basalt.debug("Selection color active:", active)
basalt.autoUpdate()
```
In this example, a Treeview object is created and added to the mainFrame. The `setSelectionColor` method is used to set the background color to blue and the foreground color to white. The `isSelectionColorActive` method is then used to check if the selection color is active.