5.1. Main functions¶
- msgbox(message[, title="", meesageType=IDEA, root=None])¶
Shows a message dialog with ok button only.
Parameters: - message (str) – text to present in the dialog
- title (str) – title of the dialog
- messageType (int) – type of icon to use.
- root (DefaultFrame or None) – Frame reference
- inputbox(message[, title="", messageType=IDEA, initialValue="", root=None])¶
Shows a input dialog.
Parameters: - message (str) – text to present in the dialog
- title (str) – title of the dialog
- messageType (int) – type of icon to use.
- initialValue (str) – Initial value of the inputbox
- root (DefaultFrame or None) – Frame reference
Returns: Return text in the input box
Return type: str
- confirmDialog(message[, title="", optionType=YES_NO, messageType=IDEA, root=None])¶
Create a message dialog with options button
Parameters: - message (str) – text to present in the dialog
- title (str) – title of the dialog
- optionType (int) – bottons to show
- messageType (int) – type of icon to use.
- filechooser(option[, title="", initialPath=None, multiselection=False, filter = None, fileHidingEnabled=True, root=None])¶
- Allows configuration parameters to filechooser dialogs
Parameters: - option (int) – file chooser selection mode. Allowed values: OPEN_FILE, OPEN_DIRECTORY, SAVE_FILE
- title (str) – Window title
- initialPath (str) – Initial path to the directory to open in the dialog
- multiselection (boolean) – Allow select more than one object.
- filter (List of Strings) – list of acepted extension files (“jpg”, “png”, “gif”)
- fileHidingEnabled (boolean) – True if hidden files are not displayed
Returns: Selected path or list of paths
- openFileDialog([title='', initialPath=None, root=None])¶
- Shows a window dialog to choose one file.
Parameters: - title (str) – Window title. Default ‘’
- initialPath (str) – Initial path to open in window dialog
- openFolderDialog([title='', initialPath=None, root=None])¶
Shows a window dialog to choose one folder.
Parameters: - title (str) – Window title. Default ‘’
- initialPath (str) – Initial path to open in window dialog
- saveFileDialog([title='', initialPath=None, root=None])¶
Shows a window dialog to choose one file.
Parameters: - title (str) – Window title. Default ‘’
- initialPath (str) – Initial path to open in window dialog
- getJavaFile(path)¶
Returns a java File using parameter path. If path doesn’t exists looks for user home folder and if can not find it, returns path will be gvSIG instance directory.
Parameters: path (str) – String-path. Returns: Return java.io.File