Skip to content

Dropdown

Dropdowns are objects where the user can click on a button, which opens a list from which the user can choose an item.

Properties

PropertyTypeDescription
openedboolIndicates if the dropdown list is currently visible
dropdownHeightnumberThe maximum height of the dropdown list when opened
dropdownWidthnumberThe width of the dropdown list

Example

The following example demonstrates how to create a Dropdown object:

lua
local main = basalt.addFrame()
local myDropdown = main:addDropdown()

-- Adding items to the dropdown
myDropdown:setItems({"Option 1", "Option 2", "Option 3"})

Released under the MIT License.