From bb867c1fe216d9670668431030ea081ec965e634 Mon Sep 17 00:00:00 2001
From: Robert Jelic <36573031+NoryiE@users.noreply.github.com>
Date: Mon, 2 May 2022 21:01:42 +0200
Subject: [PATCH] Updated List (markdown)
---
List.md | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/List.md b/List.md
index 2a55096..33097c9 100644
--- a/List.md
+++ b/List.md
@@ -80,6 +80,34 @@ aList:selectItem(1)
**parameters:** number index
**returns:** self
+## 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:** -
+**returns:** self
+
+## 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:** -
+**returns:** number index
+
## setSelectedItem
Sets the background of the item which is currently selected