Difference between revisions of "Lua:Class:SaveDialog"
Jump to navigation
Jump to search
(→Methods) |
(execute() return value) |
||
| Line 1: | Line 1: | ||
[[Category:Lua]] | [[Category:Lua]] | ||
===Methods=== | ===Methods=== | ||
| − | execute(): True, if a file was selected. False on cancel. | + | execute() : Boolean - True, if a file was selected. False on cancel. |
copyFrom(stream, count) - Copies count bytes from the given stream to this stream | copyFrom(stream, count) - Copies count bytes from the given stream to this stream | ||
read(count): bytetable - Returns a bytetable containing the bytes of the stream. This increases the posion | read(count): bytetable - Returns a bytetable containing the bytes of the stream. This increases the posion | ||
Revision as of 14:35, 20 June 2017
Contents
Methods
execute() : Boolean - True, if a file was selected. False on cancel. copyFrom(stream, count) - Copies count bytes from the given stream to this stream read(count): bytetable - Returns a bytetable containing the bytes of the stream. This increases the posion write(bytetable, count OPTIONAL)- Writes the given bytetable to the stream
Properties
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:
load_dialog = createOpenDialog(self)
load_dialog.InitalDir = os.getenv('%USERPROFILE%')
load_dialog.execute()
print(load_dialog.FileName)