[8:7] extends: FxObj
JavaFX FileChooser class.
FileChooser (string Title = null
)
Constructor takes the title of the FileChooser dialog.
Title
is an optional string with the title of the dialog.this
objectsetTitle (string Title
)
Sets the dialog title with the provided string.
Title
is a string with the title to set.this
objectsetInitDir (string Dir
)
Sets the initial directory to start the FileChooser dialog in.
Dir
is a string with the directory to start in.this
objectsetInitFileName (string FileName
)
Sets the initial file name of the FileChooser dialog.
FileName
is a string with the FileName to set.this
objectaddFilter (string FilterName, list ExtList
)
Adds the FileChooser filter with the provided name and list of extensions.
FilterName
is a string with the name of the filter.ExtList
is a list of file extensions for this filter. An example is ['.jpg', '.jpeg', '*.png']this
objectshow (MainStage
)
Shows the standard FileChooser dialog with the provided main Stage object.
MainStage
is the main JavaFX Stage object.A
string with the path of the file that was picked or null if no file was chosen.showMultiple (MainStage
)
Shows the dialog with the provided main Stage object but allowing multiple file selection.
MainStage
is the main JavaFX Stage object.A
list of strings with the files that were chosen or an empty list of none were picked.showSave (MainStage
)
Shows the dialog with the provided main Stage object but for save file.
MainStage
is the main JavaFX Stage object.A
string with the path of the file that was picked or null if no file was chosen.