|
Derived from FileDialog, this class is responsible for opening a file browser with the intention of opening a file. More...
Public Attributes | |
bool | MultipleFiles |
True/False whether multiple files may be selected and returned or not. | |
bool | MustExist |
True/False whether the file returned must exist or not. |
Derived from FileDialog, this class is responsible for opening a file browser with the intention of opening a file.
The core usage of this dialog is to locate a file in the OS and return the path and name. This does not handle the actual file parsing or data manipulation. That functionality is left up to the FileObject class.
// Create a dialog dedicated to opening files %openFileDlg = new OpenFileDialog() { // Look for jpg image files // First part is the descriptor|second part is the extension Filters = "Jepg Files|*.jpg"; // Allow browsing through other folders ChangePath = true; // Only allow opening of one file at a time MultipleFiles = false; }; // Launch the open file dialog %result = %openFileDlg.Execute(); // Obtain the chosen file name and path if ( %result ) { %seletedFile = %openFileDlg.file; } else { %selectedFile = ""; } // Cleanup %openFileDlg.delete();
True/False whether multiple files may be selected and returned or not.
True/False whether the file returned must exist or not.