Updated List (markdown)

Robert Jelic
2022-05-02 21:01:42 +02:00
parent 21422fa5f1
commit bb867c1fe2

28
List.md

@@ -80,6 +80,34 @@ aList:selectItem(1)
**parameters:** number index<br>
**returns:** self<br>
## clear
clears the entire list
````lua
local mainFrame = basalt.createFrame("myFirstFrame"):show()
local aDropdown = mainFrame:addDropdown("myFirstDropdown"):show()
aDropdown:addItem("1. Entry")
aDropdown:addItem("2. Entry",colors.yellow)
aDropdown:addItem("3. Entry",colors.yellow,colors.green)
aDropdown:clear()
````
**parameters:** -<br>
**returns:** self<br>
## getItemIndex
returns the item index of the currently selected item
````lua
local mainFrame = basalt.createFrame("myFirstFrame"):show()
local aDropdown = mainFrame:addDropdown("myFirstDropdown"):show()
aDropdown:addItem("1. Entry")
aDropdown:addItem("2. Entry",colors.yellow)
aDropdown:addItem("3. Entry",colors.yellow,colors.green)
aDropdown:getItemIndex()
````
**parameters:** -<br>
**returns:** number index<br>
## setSelectedItem
Sets the background of the item which is currently selected