You can specify a default path/filename that will be suggested initially. If a pattern is specified, only matching files will be shown. A pattern can be something like 'Images (*.png *.jpg)' or a list of such strings. Default mode is to accept any filename. You can specify exist=True to accept only existing files. Or set exist=True and multi=True to accept multiple files. If dir==True, a single existing directory is asked.
The FileSelection class has this constructor:
path,pattern=None,exist=False,multi=False,dir=False) |
FileSelection objects have the following methods:
) |
Return the filename selected by the user. If the user hits CANCEL or ESC, None is returned.