public class SaveFileDialog extends FileDialog:
Selects a destination filename without creating the file.
import klyn.gui.windows.dialogs
dialog = SaveFileDialog("Export report")
dialog.suggestedName = "report"
dialog.defaultExtension = "html"
if dialog.showDialog():
dialog.selectedFile.write("<h1>Report</h1>")| Modifier and Type | Member | Description |
|---|---|---|
| public property | confirmOverwriteconfirmOverwrite as Boolean = true |
Whether replacing an existing file requires explicit confirmation. |
| public property | defaultExtensiondefaultExtension as String = "" |
Extension appended when the selected filename has no extension. |
| public readonly property | selectedFileselectedFile as FilePath: |
Destination selected by the last successful invocation, or null. |
| public property | suggestedNamesuggestedName as String = "" |
Filename proposed when the dialog opens. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | SaveFileDialogSaveFileDialog(title as String = "Save file"): |
Creates a save-file dialog. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | showDialogshowDialog(owner as Window = null) as Boolean throws DialogException: |
Displays the chooser and waits for a destination or cancellation. |