Difference between revisions of "Lua:Class:OpenDialog"
Jump to navigation
Jump to search
Bronzdragon (talk | contribs) (Page creation.) |
m (moved OpenDialog to Lua:Class:OpenDialog) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | [[Category:Lua]] | ||
===Methods=== | ===Methods=== | ||
execute() | execute() | ||
Line 45: | Line 46: | ||
load_dialog.execute() | load_dialog.execute() | ||
print(load_dialog.FileName) | print(load_dialog.FileName) | ||
+ | |||
+ | |||
+ | {{LuaSeeAlso}} |
Latest revision as of 00:21, 25 January 2018
Contents
Methods[edit]
execute()
Properties[edit]
Title: string - The caption at top of the dialog DefaultExt: string - When not using filters this will be the default extention used if no extension is given Files: Strings - Stringlist containing all seleced files if multiple files are selected FileName: string - The filename that was selected Filter: string - A filter formatted string FilterIndex: integer - The index of which filter to use InitialDir: string - Sets the folder the filedialog will show first
Options: String A string formatted as "[param1, param2, param3]" to set OpenDialogs options Valid parameters are: ofReadOnly, ofOverwritePrompt : if selected file exists shows a message, that file will be overwritten ofHideReadOnly : hide read only file ofNoChangeDir : do not change current directory ofShowHelp : show a help button ofNoValidate ofAllowMultiSelect : allow multiselection ofExtensionDifferent ofPathMustExist : shows an error message if selected path does not exist ofFileMustExist : shows an error message if selected file does not exist ofCreatePrompt ofShareAware ofNoReadOnlyReturn : do not return filenames that are readonly ofNoTestFileCreate ofNoNetworkButton ofNoLongNames ofOldStyleDialog ofNoDereferenceLinks : do not expand filenames ofEnableIncludeNotify ofEnableSizing : dialog can be resized, e.g. via the mouse ofDontAddToRecent : do not add the path to the history list ofForceShowHidden : show hidden files ofViewDetail : details are OS and interface dependent ofAutoPreview : details are OS and interface dependent
Example usage:[edit]
load_dialog = createOpenDialog(self) load_dialog.InitalDir = os.getenv('%USERPROFILE%') load_dialog.execute() print(load_dialog.FileName)