LightBox
classin packageklyn.gui.windows
public class LightBox extends Container:
└ LightBox

Modal overlay container with a centered panel.

LightBox provides the reusable overlay/panel behavior. Applications put their own controls into content.

box = LightBox()
box.content.layout = VBoxLayout(spacing=8)
(box.content.layout as VBoxLayout).add(Label("Connection"))
box.setActive(true)
Attributes inherited from Widget: keyPressed, keyReleased, mouseMoved, mousePressed, mouseReleased, mouseWheel, paintRequested, resized
Properties
Modifier and Type Member Description
public readonly property content
content as Container
Content container placed inside the centered panel.
public property paddingX
paddingX as Int = 28
Inner horizontal padding.
public property paddingY
paddingY as Int = 24
Inner vertical padding.
public property panelHeight
panelHeight as Int = 480
Preferred panel height.
public property panelWidth
panelWidth as Int = 640
Preferred panel width.
Properties inherited from Container: autoRelayout, layout, padding, size
Properties inherited from Widget: accentColor, backgroundColor, borderColor, bottom, canFocus, cornerRadius, font, foregroundColor, hasFocus, height, isEnabled, isHovered, isManaged, isTabStop, isVisible, layoutParams, margin, maxHeight, maxWidth, minHeight, minWidth, parent, preferredHeight, preferredWidth, right, sizePolicy, styleClass, width, window, x, y
Constructors
Modifier and Type Member Description
public LightBox Creates an active lightbox.
Methods
Modifier and Type Member Description
public close
close() as Void:
Closes the modal overlay.
public override paint
paint(painter as Painter) as Void:
No summary.
public setActive
setActive(active as Boolean) as Void:
Shows or hides the modal overlay.
public override setBounds
setBounds(x as Int, y as Int, width as Int, height as Int) as Void:
No summary.
Methods inherited from Container: add, applyLayout, attachWindow, children, clear, paintOverlay, remove, withLayout
Methods inherited from Widget: blur, containsPoint, emitKeyPressed, emitKeyReleased, emitMouseMoved, emitMousePressed, emitMouseReleased, emitMouseWheel, handleTabKey, notifyPaintRequested, paint, paintOverlay, repaint, requestFocus, resolvePreferredHeight, resolvePreferredWidth, resolvedFont, setBounds
Operators inherited from Container: operator[](index as Int) as Widget:, operator[](index as UInt) as Widget: