addOKButton
fun addOKButton(text: String = Constants.OK, additionalKey: KeyCharAndCode? = null, validate: () -> Boolean = { true }, action: () -> Unit): Cell<TextButton>
Content copied to clipboard
Adds a TextButton that can close the popup, with RETURN already mapped.
Return
The new Cell, NOT marked as end of row.
Parameters
text
The button's caption, defaults to "OK".
additionalKey
An additional key that should act like a click.
validate
Function that should return true when the popup can be closed and action
can be run. When this function returns false, nothing happens.
action
A lambda to be executed after closing the popup when the button is clicked.
Sources
jvm source
Link copied to clipboard