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)
Properties
Modifier and Type Member Description
public readonly property content
content as Container
Content container placed inside the centered panel.
public property minPanelHeight
minPanelHeight as Int = 240
Minimum panel height after the preferred size has been constrained by the available overlay height.
public property minPanelWidth
minPanelWidth as Int = 320
Minimum panel width after the preferred size has been constrained by the available overlay width.
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.
Inherited Properties
propertyInherited Properties from Container: autoRelayout, layout, padding, size
propertyInherited Properties 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
Inherited Events
eventInherited Events from Widget: keyPressed, keyReleased, mouseMoved, mousePressed, mouseReleased, mouseWheel, paintRequested, resized
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.
Inherited Methods
methodInherited Methods from Container: add, applyLayout, attachWindow, children, clear, paintOverlay, remove, withLayout
methodInherited Methods from Widget: blur, containsPoint, emitKeyPressed, emitKeyReleased, emitMouseMoved, emitMousePressed, emitMouseReleased, emitMouseWheel, handleTabKey, notifyPaintRequested, paint, paintOverlay, repaint, requestFocus, resolvePreferredHeight, resolvePreferredWidth, resolvedFont, setBounds
Inherited Operators
operatorInherited Operators from Container: operator[](index as Int) as Widget:, operator[](index as UInt) as Widget: