FileDialog
Base class for file dialogs.
Module | require("yue.gui") |
Type | Class |
Class properties
integer
optionpickfolders
Option that indicates the open dialog will open folders instead of files.
integer
optionmultiselect
Option that indicates the open dialog can select multiple items.
integer
optionshowhidden
Option that indicates hidden files will always show in the dialog.
Methods
getresult()
Return the chosen item in dialog.
Return
string
run()
Show the dialog and wait for result, return true
if user has chosen
item(s).
Return
boolean
runforwindow(window)
Show the dialog as a modal child of parent window
and wait for result,
return true
if user has chosen item(s).
Parameters
Window
window
Return
boolean
settitle(title)
Set the title of the dialog.
Parameters
string
title
setbuttonlabel(label)
Set the text of accept button.
Parameters
string
label
setfilename(filename)
Set the filename to show in the dialog.
Parameters
string
filename
setfolder(folder)
Set a folder
that is always selected when the dialog is opened
Parameters
string
folder
setoptions(options)
A bit array of options
.
Parameters
integer
options
setfilters(filters)
Set the file types that the dialog can open or save.
Parameters
table
filters - An array ofFileDialog::Filter
objects.