ComboBox
class in package klyn.gui.terminal

    public class ComboBox extends Widget:

Object
└ Widget
└ ComboBox

Single-line terminal combo box.

The widget keeps the value constrained to a predefined list. In terminal mode, the selection is changed with `ENTER`, `SPACE`, `LEFT`, `RIGHT`, or a mouse click.

    combo = ComboBox("Level", ["none", "low", "medium", "high"], "medium")
    print(combo.selectedValue)

Attributes inherited from Widget: lastRenderAnsi, lastRenderHeight, lastRenderPlain, lastRenderWidth, layout, visible
Properties

Modifier and Type | Member | Description
--- | --- | ---
public property | bgFocus `bgFocus as String = "\u001b[48;2;56;72;84m"` | No summary.
public property | bgNormal `bgNormal as String = "\u001b[48;2;44;44;48m"` | No summary.
public property | fgFocus `fgFocus as String = "\u001b[38;2;255;255;255m"` | No summary.
public property | fgNormal `fgNormal as String = "\u001b[38;2;245;245;245m"` | No summary.
public override readonly property | focusable `focusable as Boolean:` | No summary.
public override property | focused `focused as Boolean:` | No summary.
public property | id `id as String = ""` | No summary.
public property | label `label as String = ""` | No summary.
public property | labelWidth `labelWidth as Int = 18` | No summary.
public property | options `options as ArrayList<String>:` | No summary.
public property | selectedIndex `selectedIndex as Int:` | No summary.
public property | selectedValue `selectedValue as String:` | No summary.

Properties inherited from Widget: focusable, focused, lastRenderFrame, position, size
Properties inherited from Object: type
Constructors

Modifier and Type | Member | Description
--- | --- | ---
public | ComboBox `ComboBox(label as String = "", options as ArrayList<String> = null, selectedValue as String = "", labelWidth as Int = 18):` | No summary.

Methods

Modifier and Type | Member | Description
--- | --- | ---
public override | handleEvent `handleEvent(eventName as String) as Boolean:` | No summary.
public override | handleMouseEvent `handleMouseEvent(mouse as MouseEvent, localX as Int, localY as Int, viewWidth as Int, viewHeight as Int) as Boolean:` | No summary.
public override | paintToFrame `paintToFrame(frame as TerminalFrame, row as Int, col as Int, width as Int, height as Int) as Boolean:` | No summary.
public | selectNext `selectNext() as Void:` | No summary.
public | selectPrevious `selectPrevious() as Void:` | No summary.
public | selectValue `selectValue(value as String) as Void:` | No summary.

Methods inherited from Widget: add, baseAnsiStyle, captureRenderFrame, children, clearChildren, configureCursor, focusNext, handleEvent, handleMouseEvent, hasActiveTextInput, idle, paint, paintToFrame, performLayout, refresh, renderAnsiSnapshot, renderPlainSnapshot, scrollbarThumbGlyph, scrollbarTrackGlyph, terminalPromptVisible
Methods inherited from Object: fromJson, toDict, toJson, toString, toXml