FileDialog
classin packageklyn.gui.windows.dialogs
public abstract class FileDialog extends Dialog:
└ Widget
└ Dialog
└ FileDialog

Shared configuration for file-selection dialogs.

Applications normally instantiate OpenFileDialog or SaveFileDialog. The implementation uses the native operating-system chooser where one is available and falls back to the themed Klyn chooser without changing this public contract. File dialogs inherit their window title from Dialog and are modal by default.

import klyn.gui.windows.dialogs

dialog = OpenFileDialog()
dialog.initialFolder = Path.userHome
dialog.filters = [FileDialogFilter("Klyn sources", "*.kn")]
Inherited Attributes
attributeInherited Attributes from Dialog: terminal, title
attributeInherited Attributes from Widget: lastRenderAnsi, lastRenderHeight, lastRenderPlain, lastRenderWidth, layout, visible
Properties
Modifier and Type Member Description
public property filterIndex
filterIndex as Int
Zero-based selected filter index.
public property filters Available filename filters.
public property initialFolder
initialFolder as FolderPath
Folder initially displayed by the chooser.
Inherited Properties
propertyInherited Properties from Widget: focusable, focused, lastRenderFrame, position, size
propertyInherited Properties from Object: type
Inherited Events
eventInherited Events from Dialog: accepted, cancelled
Inherited Methods
methodInherited Methods from Dialog: accept, cancel, close, show
methodInherited Methods from Widget: add, baseAnsiStyle, captureRenderFrame, children, clearChildren, configureCursor, focusNext, handleEvent, handleMouseEvent, hasActiveTextInput, idle, paint, paintToFrame, performLayout, refresh, renderAnsiSnapshot, renderPlainSnapshot, scrollbarThumbGlyph, scrollbarTrackGlyph, terminalPromptVisible
methodInherited Methods from Object: deepCopy, fromJson, hash, toDict, toJson, toString, toXml