Skip to content

PyControlDropDown

No properties found.

No fields found.

No enums found.

Get the selected index of the dropdown. The first entry is 0.

Return Type: int


(onSelectionChanged) Add an onSelectionChanged callback to this dropdown control. The callback function will receive the selected index as a parameter. Example:

def on_select(index):
API.SysMsg(f"Selected index: {index}")
dropdown = API.Gumps.CreateDropDown(100, ["first", "second", "third"], 0)
dropdown.OnDropDownOptionSelected(on_select)
while True:
API.ProcessCallbacks()

Parameters:

NameTypeOptionalDescription
onSelectionChangedobject❌ NoThe callback function that receives the selected index

Return Type: PyControlDropDown