addButton

fun addButton(text: String, data: Any, tooltip: String, isActive: Boolean = true)

Add a new button to a button group

The button will be positioned automatically.

Parameters

text

name of the button, will be displayed inside the button

data

data represented by the button

tooltip

will be displayed when user hovers over the button

isActive

if true, the button will be active at the beginning

Example:

addButton("MyButton", "button data, e.g. a String", "My tooltip", false);