Link to home
Start Free TrialLog in
Avatar of frog
frog

asked on

TOpenDialog and MultiSelect

I can get a TOpenDialog to select a directory but I cann ot get it to multiselect several directories.
(I have ofAllowMultiSelect = true.)
What else do I need to do?


Avatar of Motaz
Motaz

You cann't select directory by TOpenDialog, if you mean multiple files, then you are right only turn ofAllowMultiSelect to True, then you can select many files:

  if OpenDialog1.Execute then
    ShowMessage(OpenDialog1.Files.Text);

Motaz
ASKER CERTIFIED SOLUTION
Avatar of rfedyk
rfedyk

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of frog

ASKER

Thanks Motaz and Roger for your comments.

I don't want to access any files, I just want to multiselect several directories and have them listed in the TStrings like multiselected files do.
By setting OpenDialog.Filename to any string, say 'dir', before the .execute the OpenDialog will select a single directory and return its path. But it will not multiselect directories. I was hoping for a patch that would enable multiselect for directories.
I would like to use TOpenDialog for consistencey with other file and directory selection tasks.
This particular task is 'Select the directories you want to search'  then the user multiselects several directories, then the application searches the selected directories, etc.

frog:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.