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. The close button uses a 36-pixel logical hit area and a visible multiplication-sign cross, aligned with the header.

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, childCount, layout, padding
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 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, blur, children, clear, paintOverlay, remove, withLayout
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
Inherited Operators
operatorInherited Operators from Container: operator[](index as Int) as Widget, operator[](index as UInt) as Widget