AddDropdown

Add dropdown to group box

Syntax

Groupbox:AddDropdown({
    Index = "unique tool index",
    Text = "Text",
    Default = 1,
    Values = {
        "Option 1",
        "Option 2",
        "Option 3"
    }
})

Index value is optional. Values table must have at least 1 value to work (I think💀)

Dropdown:OnChanged(function(value) -- If dropdown value changed
    print(value)
end)

Dropdown:SetValues(table) --// Replace dropdown items
Dropdown:Show() 
Dropdown:Hide() 
Dropdown:SetValue(val) --// Index of item OR item name
Dropdown:AddTooltip("Tooltip Text")

Example

Code shown below is missing some critical syntax for simplicity

Dropdown Demo

Last updated