Developer Resources
DirectoryDialog
Overview
Class that represents a directory chooser dialog.
Constructor
- DirectoryDialog()
Methods
- DirectoryDialog.getMessage
- Gets the message to display in the directory dialog.
- DirectoryDialog.getPath
- Gets the path selected by the user.
- DirectoryDialog.setMessage
- Sets the message to display in the directory dialog.
- DirectoryDialog.setPath
- Sets the initial path to show in the directory dialog.
- DirectoryDialog.showDialog
- Shows the directory dialog.
Example
// display a directory dialog // and show a message box with the selected // path if the user pressed OK var dlg = new DirectoryDialog; if (dlg.showDialog()) { alert(dlg.getPath()); }
DirectoryDialog.getMessage
- function DirectoryDialog.getMessage() : String
Returns
Returns the message to display in the directory dialog.
Description
Returns the message to display in the directory dialog.
DirectoryDialog.getPath
- function DirectoryDialog.getPath() : String
Returns
Returns the path selected by the user.
Description
Returns the path selected by the user.
DirectoryDialog.setMessage
- function DirectoryDialog.setMessage(text : String)
Arguments
- text
- Sets the message to display in the directory dialog to text.
Description
Sets the message to display in the directory dialog to text.
DirectoryDialog.setPath
- function DirectoryDialog.setPath(text : String)
Arguments
- text
- The initial path to show in the directory dialog.
Description
Sets the initial path to show in the directory dialog.
DirectoryDialog.showDialog
- function DirectoryDialog.showDialog() : Boolean
Returns
Returns DialogResult.Ok when the dialog is closed by pressing "OK" or equivalent, and DialogResult.Cancel if the dialog is closed by pressing "Cancel" or equivalent.
Description
Shows a directory dialog and returns DialogResult.Ok if the user closes the directory dialog by pressing "OK", or the equivalent, and DialogResult.Cancel if the user closes the directory dialog by pressing "Cancel", or the equivalent.