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