addButton

fun addButton(text: String, key: KeyCharAndCode? = null, action: () -> Unit): Cell<TextButton>

Adds a TextButton and ends the current row.

Return

The new Cell

Parameters

text

The button's caption.

key

Associate a key with this button's action.

action

A lambda to be executed when the button is clicked.

fun addButton(text: String, key: Char, action: () -> Unit): Cell<TextButton>
fun addButton(text: String, key: Int, action: () -> Unit): Cell<TextButton>