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

Modal lightbox that selects one or more existing files.

The lightbox is the embedded counterpart of OpenFileDialog. It never starts a nested window or native chooser and therefore integrates naturally into workbench-style applications.

chooser = OpenFileLightBox("Open Klyn sources")
chooser.filters = [FileDialogFilter("Klyn sources", "*.kn")]
chooser.accepted += lambda(event: ActionEvent): print(chooser.selectedFiles)
window.centralWidget.add(chooser)
chooser.open()
Properties
Modifier and Type Member Description
public property allowMultiple
allowMultiple as Boolean = false
Whether more than one file may be selected.
public property filterIndex
filterIndex as Int = 0
Zero-based filter selected when the lightbox opens and after acceptance.
public property filters
filters as IList<FileDialogFilter> = []
Available filename filters.
public readonly property selectedFiles
selectedFiles as IList<FilePath>:
Files selected by the last accepted interaction.
Inherited Properties
propertyInherited Properties from FileDialogLightBox: initialFolder, title
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
Inherited Events
eventInherited Events from FileDialogLightBox: accepted, cancelled
eventInherited Events from Widget: focusGained, focusLost, keyPressed, keyReleased, mouseMoved, mousePressed, mouseReleased, mouseWheel, paintRequested, resized
Constructors
Modifier and Type Member Description
public OpenFileLightBox
OpenFileLightBox(title as String = "Open file"):
Creates an inactive open-file lightbox.
Methods
Modifier and Type Member Description
public open
open() as Void:
Opens the lightbox over its containing window.
Inherited Methods
methodInherited Methods from FileDialogLightBox: close
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: