CheckBox
class in package klyn.gui.windows

    public class CheckBox extends AbstractButton:

Widget
└ AbstractButton
└ CheckBox

Check box widget.

    box = CheckBox("Enable limiter")
    box.stateChanged += lambda(event: ValueChangedEvent): print(event.value)

Fields

Modifier and Type | Member | Description
--- | --- | ---
public event | stateChanged `stateChanged as Event` | No summary.

Attributes inherited from AbstractButton: clicked
Properties

Modifier and Type | Member | Description
--- | --- | ---
public property | isChecked `isChecked as Boolean = false` | No summary.

Properties inherited from AbstractButton: icon, isDefaultButton, isPressed, text
Properties inherited from Widget: accentColor, backgroundColor, borderColor, bottom, canFocus, cornerRadius, font, foregroundColor, hasFocus, height, isEnabled, isHovered, isManaged, isVisible, layoutParams, margin, maxHeight, maxWidth, minHeight, minWidth, parent, preferredHeight, preferredWidth, right, sizePolicy, styleClass, width, window, x, y
Constructors

Modifier and Type | Member | Description
--- | --- | ---
public | CheckBox `CheckBox(text as String = ""):` | No summary.

Methods

Modifier and Type | Member | Description
--- | --- | ---
public | checkedValue `checkedValue() as Int:` | Returns `1` when checked, otherwise `0`.
public override | click `click() as Void:` | Toggles the checked state and emits `stateChanged`.
public override | paint `paint(painter as Painter) as Void:` | Paints the check box using the active KSS colors.

Methods inherited from AbstractButton: click, performClick, press, release
Methods inherited from Widget: blur, containsPoint, paint, repaint, requestFocus, resolvePreferredHeight, resolvePreferredWidth, resolvedFont, setBounds