public class OpenFileLightBox extends FileDialogLightBox:
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()| Modifier and Type | Member | Description |
|---|---|---|
| public property | allowMultipleallowMultiple as Boolean = false |
Whether more than one file may be selected. |
| public property | filterIndexfilterIndex as Int = 0 |
Zero-based filter selected when the lightbox opens and after acceptance. |
| public property | filtersfilters as IList<FileDialogFilter> = [] |
Available filename filters. |
| public readonly property | selectedFiles | Files selected by the last accepted interaction. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | OpenFileLightBoxOpenFileLightBox(title as String = "Open file"): |
Creates an inactive open-file lightbox. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | openopen() as Void: |
Opens the lightbox over its containing window. |