Button
class in package klyn.gui.windows

    public class Button extends AbstractButton:

Widget
└ AbstractButton
└ Button

Push button widget.

Buttons expose a painter-based rendering with a modern filled appearance.

    button = Button("Save")
    button.press()
    button.release()

Properties

Modifier and Type | Member | Description
--- | --- | ---
public property | isPrimary `isPrimary as Boolean` | Indicates whether the button should use the accent color.

Inherited Properties
property Inherited Properties from AbstractButton: icon, isDefaultButton, isPressed, text
property Inherited Properties from Widget: accentColor, backgroundColor, borderColor, bottom, canFocus, cornerRadius, cursor, font, foregroundColor, hasFocus, height, isEnabled, isHovered, isManaged, 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
Inherited Events
event Inherited Events from AbstractButton: clicked, pressed, released
event Inherited Events from Widget: keyPressed, keyReleased, mouseMoved, mousePressed, mouseReleased, mouseWheel, paintRequested, resized
Constructors

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

Methods

Modifier and Type | Member | Description
--- | --- | ---
public override | paint `paint(painter as Painter) as Void:` | Paints the button using the active KSS style and interaction state.

Inherited Methods
method Inherited Methods from AbstractButton: click, performClick, press, release
method Inherited Methods from Widget: blur, containsPoint, emitKeyPressed, emitKeyReleased, emitMouseMoved, emitMousePressed, emitMouseReleased, emitMouseWheel, handleTabKey, notifyPaintRequested, paint, paintClipped, paintOverlay, repaint, requestFocus, resolvePreferredHeight, resolvePreferredWidth, resolvedFont, setBounds