Reference/Datatypes/GuiDropdown
Datatype · Userdata

GuiDropdown

userdata

Dropdown proxy returned by GuiCategory:add_dropdown. 1-based indices, with 0 reserved for "no selection".

Fields

NameTypeDescription
categoryGuiCategory?

Back-reference to the owning category. nil after the owning tab is gone.

destroy() -> ()

Marks the dropdown destroyed.

get_index() -> number

Returns the current 1-based index.

get_selected() -> string?

Returns the current option text.

is_destroyed() -> boolean

Returns the destroyed flag.

is_visible() -> boolean

Returns the visibility flag.

kindControlKind

Always Enum.ControlKind.Dropdown.

labelstring

Current label text.

namestring

Alias for label.

on_changed(callback: (index: number) -> ()) -> GuiConnection

Registers an additional change listener.

set_index(index: number) -> ()

Sets the dropdown's index.

set_label(text: string) -> ()

Replaces the label.

set_selected(value: string) -> boolean

Selects the option whose text matches value.

set_visible(visible: boolean) -> ()

Shows or hides the dropdown.

update_options(options: { string }) -> ()

Replaces the option list.