Hi all. I apologize for my imperfect english.
I'm a begginner in gui development.
I need to extend the wxDirDialog allowing multiples selections of folders. It is possible? Any suggestion?
Thanks in advance,
On 8 August 2011 03:25, Rosario Borda <rosario.borda@...> wrote:
> Hi all. I apologize for my imperfect english.
> I'm a begginner in gui development.
> I need to extend the wxDirDialog allowing multiples selections of folders.
> It is possible? Any suggestion?
I'm afraid there is no way to do this - or at least no easy way.
There are two ways that I think you could try.
The first is to use wxFileDialog with wxFD_MULTIPLE style. This uses the
normal file selection dialog, but allows you to select multiple items.
The second, better way to do things would be to create a tree control. The
FileBrowse.hs sample shows you how to create a tree control, but you will
need to make some changes to allow multiple selections.
Firstly you will need to call wxTreeCtrl_Create with wxTR_EXTENDED in the
style field, instead of using treeCtrl.
Secondly, you will need to modify the event handling for onTreeEvent to
properly handle multiple selection and deselection but modifying the
handling of TreeSelChanged.
I hope this helps you to move forward.