How do I open folder selection dialog in Perl?
Depends on the GUI system you're using, and perhaps the platform. For example, on Windows and using Win32::GUI
, you can use GetOpenFileName
:
# $main is your main window...
$my_file = $main->GetOpenFileName(
-title => 'Select a file...',
-file => 'default.file',
);
You may want to check out the GUI bindings in wxPerl.
来源:https://stackoverflow.com/questions/1871290/how-do-i-present-an-open-folder-selection-dialog-in-perl