wxDirDialog with multiple selections?
wxDirDialog with multiple selections?
Hi everyone, how would you go about adding the ability to select multiple folders when using wxDirDialog?
I could use wxGenericDirCtrl to implement my own solution but I wonder if there isn't a more straightforward way of doing it with wxDirDialog.
Thx, stay safe.
I could use wxGenericDirCtrl to implement my own solution but I wonder if there isn't a more straightforward way of doing it with wxDirDialog.
Thx, stay safe.
Re: wxDirDialog with multiple selections?
Pumping this question up in case someone's got an idea.
Re: wxDirDialog with multiple selections?
It's not possible because wxDirDialog hold only one selected item.
Re: wxDirDialog with multiple selections?
I don't remember to have ever seen a dir dialog which allows multiple selections. So the main question is: Does any of the native controls on the 3 major platforms support this?
Use the source, Luke!
Re: wxDirDialog with multiple selections?
Yep
IFileDialog(win32 api) supports both the flag FOS_ALLOWMULTISELECT and FOS_PICKFOLDERS at the same time.
IFileDialog: https://docs.microsoft.com/en-us/window ... setoptions
Flags: https://docs.microsoft.com/en-us/window ... logoptions
Turns out Mac too: https://developer.apple.com/documentati ... eselection
GTK too apparentlyA Boolean that indicates whether the user can choose directories in the panel.
FileChooserDialog: https://valadoc.org/gtk+-3.0/Gtk.FileChooserDialog.html
flag: SELECT_FOLDER and the function set_select_multiple from the base class FileChooser.
It's a useful feature when you need to select multiple folders...
Re: wxDirDialog with multiple selections?
Thanks. Please open a request ticket at http://trac.wxwidgets.org and include that information.
Use the source, Luke!
Re: wxDirDialog with multiple selections?
Done.
http://trac.wxwidgets.org/ticket/18736
Meanwhile, if anyone's got any pointers on how to modify wxFileDialog to create a version that selects folders instead of files, I'am all ears.
Thx
http://trac.wxwidgets.org/ticket/18736
Meanwhile, if anyone's got any pointers on how to modify wxFileDialog to create a version that selects folders instead of files, I'am all ears.
Thx
Re: wxDirDialog with multiple selections?
Hi,
Did you check it?
Thank you.
Mac probably doesn't support it - it just an indication that the dialog/panel supports selecting the directories vs files.david_mtl wrote: ↑Fri Apr 24, 2020 4:51 pmYep
IFileDialog(win32 api) supports both the flag FOS_ALLOWMULTISELECT and FOS_PICKFOLDERS at the same time.
IFileDialog: https://docs.microsoft.com/en-us/window ... setoptions
Flags: https://docs.microsoft.com/en-us/window ... logoptions
Turns out Mac too: https://developer.apple.com/documentati ... eselectionA Boolean that indicates whether the user can choose directories in the panel.
Did you check it?
Thank you.
david_mtl wrote: ↑Fri Apr 24, 2020 4:51 pm GTK too apparently
FileChooserDialog: https://valadoc.org/gtk+-3.0/Gtk.FileChooserDialog.html
flag: SELECT_FOLDER and the function set_select_multiple from the base class FileChooser.
It's a useful feature when you need to select multiple folders...
Re: wxDirDialog with multiple selections?
I don't understand what you mean. That's the SDK to write apps on MacOS.Mac probably doesn't support it - it just an indication that the dialog/panel supports selecting the directories vs files.
Did you check it?
Here's the api for the file dialog: https://developer.apple.com/documentati ... guage=objc
Notice the section "Configuring the Open Panel".
You'll see both:
Code: Select all
canChooseDirectories
A Boolean that indicates whether the user can choose directories in the panel.
allowsMultipleSelection
A Boolean that indicates whether the user may select multiple files and directories.
Re: wxDirDialog with multiple selections?
Just for future reference, support for multiple selection in wxDirDialog has just been added:
https://github.com/wxWidgets/wxWidgets/ ... 195af6bc32
https://github.com/wxWidgets/wxWidgets/ ... 195af6bc32