class fwt::Combo

sys::Obj
  fwt::Widget
    fwt::Combo

@Js
@Serializable

Source

Combo is a combination of a text field and a list drop down.

const Bool dropDown := true

Source

If true then the list is displayed in a drop down window. If false then the list is displayed directly under the text field. Default is true.

editable

const Bool editable := false

Source

Set to true to display editing of the combo's text field. Default is false.

font

Font? font

Source

Font for text. Defaults to null (system default).

index

Int? index(Obj item)

Source

Get the index of the specified item. Items are matched to indices via Obj.equals. See List.index.

items

Obj[] items

Source

The list selection items displayed via Obj.toStr. Defaults to the empty list.

make

new make(|This|? f := null)

Source

Default constructor.

onAction

EventListeners onAction()

Source

Callback when Return/Enter key is pressed.

Event id fired:

Event fields:

  • none
onModify

EventListeners onModify()

Source

Callback when either the text field or item is changed.

Event id fired:

Event fields:

  • none
selected

@Transient
Obj? selected

Source

The currently selected item. Items are matched to the items list using index.

selectedIndex

@Transient
Int? selectedIndex

Source

The currently selected index of items or null if no selection.

text

Str text

Source

The widget's current text. Defaults to "".