-
Notifications
You must be signed in to change notification settings - Fork 0
Dropdown
A dropdown stores one selected value.
| Field | Type | Description |
|---|---|---|
list / options
|
table | Value-to-label map or ordered option list. |
orderList / order
|
table | Deterministic display order. |
listFunc |
function | Dynamic option map provider. |
optionfunc |
function | Dynamic order/options provider. |
menuHeight |
number | Menu height for long lists. |
customDefaultText |
string | Text when no value is selected. |
app:RegisterControl("interface.bars", {
id = "anchor",
key = "anchor",
type = "dropdown",
label = "Anchor",
list = {
LEFT = "Left",
CENTER = "Center",
RIGHT = "Right",
},
orderList = { "LEFT", "CENTER", "RIGHT" },
default = "CENTER",
})app:RegisterControl("profiles.select", {
id = "profile",
key = "profile",
type = "dropdown",
label = "Profile",
listFunc = function()
return MyAddon.GetProfileLabels()
end,
optionfunc = function()
return MyAddon.GetProfileOrder()
end,
menuHeight = 260,
})Wiki
• Home
• Architecture
• Vendoring
• Quick Start
• Field Glossary
• Troubleshooting
• Validation
Reference
⚬ Config API
⚬ UI API
⚬ Elements
⚬ Examples
Elements
Structure
• Category
• Page
• Group
• Dashboard
• InfoPage
• Custom
Controls
• Toggle
• CheckboxDropdown
• Dropdown
• MultiDropdown
• SoundDropdown
• Input
• Slider
• Button
Advanced
• ColorPicker
• ColorPalette
• ColorOverrides
• ReorderList
• Expandable
• Notes
Examples
Start
• Minimal Addon
• Complete Settings Center
• Wrapper Bridge Pattern
Data and Behavior
• Dependent Controls
• Nested Database Values
• Dynamic Dropdowns
• Runtime Refresh
• Search and New Badges
• Custom Hosted Editors
Polish
• Support Links
• Theme Colors
• Theme Borders