CheckBox
classin packageklyn.gui.windows
public class CheckBox extends AbstractButton
└ CheckBox

Check box widget.

box = CheckBox("Enable limiter")
Binding.watch(box::isChecked, lambda(value as Object): print(value))
Inherited Properties
propertyInherited Properties from AbstractButton: icon, isDefaultButton, text
propertyInherited Properties from Widget: accentColor, acceptFileDrops, backgroundColor, borderColor, bottom, canFocus, cornerRadius, cursor, font, foregroundColor, hasFocus, height, isEnabled, isHovered, isManaged, isPressed, isTabStop, isVisible, layoutParams, margin, maxHeight, maxWidth, minHeight, minWidth, parent, preferredHeight, preferredWidth, resolvedStyleCache, resolvedStyleCacheAppearanceMode, resolvedStyleCacheFont, resolvedStyleCacheRevision, resolvedStyleCacheStateKey, resolvedStyleCacheStyleClass, resolvedStyleCacheZoomRevision, right, size, sizePolicy, styleClass, toolTip, width, window, x, y
Signals
Modifier and Type Member Description
public signal property isChecked
isChecked as Boolean
Checked state observed by the data-binding engine.
Inherited Events
eventInherited Events from AbstractButton: clicked, pressed, released
eventInherited Events from Widget: filesDropped, focusGained, focusLost, keyPressed, keyReleased, mouseMoved, mousePressed, mouseReleased, mouseWheel, paintRequested, resized
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, notifies Binding.watch, then emits the inherited clicked action event.
public override paint
paint(painter as Painter) as Void
Paints the check box using the active KSS colors.
Inherited Methods
methodInherited Methods from AbstractButton: applyThemeMetrics, click, performClick, press, release
methodInherited Methods from Widget: applyThemeMetrics, blur, containsPoint, emitFilesDropped, emitFocusGained, emitFocusLost, emitKeyPressed, emitKeyReleased, emitMouseMoved, emitMousePressed, emitMouseReleased, emitMouseWheel, handleTabKey, notifyPaintRequested, paint, paintClipped, paintForeground, paintOverlay, preferredSizeIncludesContentZoom, repaint, requestFocus, resolvePreferredHeight, resolvePreferredWidth, resolvedFont, setBounds