FileDialogLightBox
classin packageklyn.gui.windows.dialogs
public abstract class FileDialogLightBox extends LightBox:
└ FileDialogLightBox

Shared modal-overlay base for file and folder chooser lightboxes.

Unlike FileDialog, this class is embedded in an existing window. Add one instance to an overlay-capable root container and subscribe to accepted or cancelled before calling the concrete lightbox's open() method. LightBox already provides modal hit testing, so no modal property is exposed.

chooser = OpenFileLightBox("Open source")
chooser.accepted += lambda(event: ActionEvent): print(chooser.selectedFiles)
window.centralWidget.add(chooser)
chooser.open()
Properties
Modifier and Type Member Description
public property initialFolder
initialFolder as FolderPath
Folder displayed whenever the chooser is opened.
public property title
title as String
Heading displayed inside the lightbox panel.
Inherited Properties
propertyInherited Properties from LightBox: content, minPanelHeight, minPanelWidth, paddingX, paddingY, panelHeight, panelWidth
propertyInherited Properties from Container: autoRelayout, childCount, layout, padding
propertyInherited Properties from Widget: accentColor, 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
Events
Modifier and Type Member Description
public event accepted
accepted as ActionEvent
Emitted after a valid file-system selection has been accepted.
public event cancelled
cancelled as ActionEvent
Emitted when the user cancels with the button, Escape key, or close icon.
Inherited Events
eventInherited Events from Widget: focusGained, focusLost, keyPressed, keyReleased, mouseMoved, mousePressed, mouseReleased, mouseWheel, paintRequested, resized
Methods
Modifier and Type Member Description
public override close
close() as Void:
Cancels and closes the active chooser.
Inherited Methods
methodInherited Methods from LightBox: close, paint, setActive, setBounds
methodInherited Methods from Container: add, applyLayout, attachWindow, children, clear, paintOverlay, remove, withLayout
methodInherited Methods from Widget: applyThemeMetrics, blur, containsPoint, emitFocusGained, emitFocusLost, emitKeyPressed, emitKeyReleased, emitMouseMoved, emitMousePressed, emitMouseReleased, emitMouseWheel, handleTabKey, notifyPaintRequested, paint, paintClipped, 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: