Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Combobox

Classes

Class: Combobox

Extends Widget

Combobox

A Combobox widget is a dropdown selection control that can be editable with autocomplete filters or read-only with predefined dropdown list. Usually consists of a editbox (or selector button) + toggle button + dropdown list.

Dependencies:

  • Button used for the dropdown downBtn, selectorBtn, and toggle fields.
  • Listbox used for the dropdown field.
  • Slider used for the dropdown vslider field.
  • X2Editbox used for the selector field.

Field: toggle

Button

Dropdown open/close button

Field: dropdown

ScrollListbox

The dropdown for the Combobox.

Field: selector

X2Editbox

The input exitbox if the Combobox is editable.

Field: selectorBtn

Button

The input button if the Combobox is not editable.

Method: SetEditable

(method) Combobox:SetEditable(editable: boolean)

Enables or disables editability of the Combobox. If set to false any guide text set to Combobox.selector will not render.

@param editabletrue to allow editing, false to disable. (default: false)

Method: SetAutocomplete

(method) Combobox:SetAutocomplete(type: "appellation"|"ingameShopGoods"|"item"|"itemForDebug"|"itemTypeForDebug"...(+1), filter: string)

Sets the autocomplete type and filter for the Combobox. Combobox:SetEditable must be set to true.

@param type — The autocomplete type.

@param filter — The autocomplete filter.

type:
    | "appellation"
    | "ingameShopGoods"
    | "item"
    | "itemForDebug"
    | "itemTypeForDebug"
    | "store"

Method: SetDropdownVisibleLimit

(method) Combobox:SetDropdownVisibleLimit(limit: number)

Sets the maximum number of visible items in the Combobox dropdown.

@param limit — The maximum number of visible items (min: 0). (default: 10)

Method: PauseAutocomplete

(method) Combobox:PauseAutocomplete(pause: boolean)

Pauses or unpauses autocomplete functionality for the Combobox.

@param pausetrue to pause autocomplete, false to unpause.

Method: Insert

(method) Combobox:Insert(datas: ItemTree[])

Inserts data into the Combobox dropdown.

@param datas — The data to insert into the dropdown.

See: ItemTree

Class: ScrollListbox

Extends Listbox

Field: downBtn

Button

Button

A Button widget is clickable and responds to mouse interaction with four visual states: normal, highlighted (hover), pushed (pressed), and disabled. Supports per-state custom backgrounds, tint colors, text coloring, auto-resize, content insets, and per-mouse-button click registration.

Dependencies:

Field: upBtn

Button

Button

A Button widget is clickable and responds to mouse interaction with four visual states: normal, highlighted (hover), pushed (pressed), and disabled. Supports per-state custom backgrounds, tint colors, text coloring, auto-resize, content insets, and per-mouse-button click registration.

Dependencies:

Field: vslider

Vslider

Class: Vslider

Extends Slider

Field: thumb

Button

Button

A Button widget is clickable and responds to mouse interaction with four visual states: normal, highlighted (hover), pushed (pressed), and disabled. Supports per-state custom backgrounds, tint colors, text coloring, auto-resize, content insets, and per-mouse-button click registration.

Dependencies: