Label
classin packageklyn.gui.windows
public class Label extends Widget
└ Label

Static text label.

Labels use the widget font stack so they integrate with modern form controls.

lbl = Label("First name")
Properties
Modifier and Type Member Description
public property buddy
buddy as Widget = null
Widget focused when the label mnemonic is activated.
public readonly property displayText
displayText as String
Text rendered on screen after removing mnemonic markers.
public property isSelectable
isSelectable as Boolean = true
Whether the user can select and copy the label text.
public property isTextSelected
isTextSelected as Boolean
Current text-selection visual state.
public property text
text as String = ""
Raw label text.
public property wordWrap
wordWrap as Boolean = false
Whether text is wrapped to the available label width.
Inherited Properties
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
Inherited Events
eventInherited Events from Widget: filesDropped, focusGained, focusLost, keyPressed, keyReleased, mouseMoved, mousePressed, mouseReleased, mouseWheel, paintRequested, resized
Constructors
Modifier and Type Member Description
public Label
Label(text as String = "")
No summary.
Methods
Modifier and Type Member Description
public override applyThemeMetrics
applyThemeMetrics(fontPixelSize as Int, paddingLeft as Int, paddingTop as Int, paddingRight as Int, paddingBottom as Int) as Void
No summary.
public static displayTextFor
displayTextFor(value as String) as String
Removes mnemonic markers from label text.
public static mnemonicDisplayIndexFor
mnemonicDisplayIndexFor(value as String) as Long
Returns the display-text index of the mnemonic marker.
public static mnemonicFor
mnemonicFor(value as String) as String
Returns the mnemonic character declared in a label text.
public override paint
paint(painter as Painter) as Void
Paints the label content with antialiased text.
Inherited Methods
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