> I'd like to let user to provide a way to select a directory using windows
> explorer style dialog
Use the VCL SelectDirectory() function or the Win32 API SHBrowseForFolder()
function for that.
Gambit
> Use the VCL SelectDirectory() function or the Win32 API SHBrowseForFolder()
> function for that.
>
>
> Gambit
>
>
SelectDirectory doesn't fit since SHBrowseForFolder does not provide a way to manage folders (cannot create, cannot rename). See again my question above! I need it to be like OpenDialog to pick folder rather then file.
> I'd like to let user to provide a way to select a directory using
> windows explorer style dialog in which a user would be able
> seeing all files, changing existing and creating new directories.
You don't need to repeat yourself. You said that exact same thing in your
original message. SHBrowseForFolder() has the functionality you are asking
for.
> SHBrowseForFolder does not provide a way to manage folders
Yes, it does. Please read the documentation. It has BIF_BROWSEINCLUDEFILES
and BIF_NEWDIALOGSTYLE flags available for what you are asking.
> I need it to be like OpenDialog to pick folder rather then file.
SHBrowseForFolder() is the official folder selection dialog that Explorer
uses.
Gambit
That is better but it still not the exact thing I need. It looks like a "tree view" thing. I need a standard file open/save folder look.
Well, since you really are looking for something like the standard open/save
file look, why don't you use the TOpenDialog component to allow the user to
select a file in the desired folder, and use ExtractFilePath() to only keep
the path information from that selection.
OpenDialog.FileName := 'Pick a folder';
if OpenDialog.Execute then
MyFolder := ExtractFilePath(OpenDialog.FileName);
It is not ideal, but I think this is a close to what you are trying to do as
one can get...
Philippe
"Iliya" <ili...@list.ru> wrote in message
news:47df...@newsgroups.borland.com...
>
> That is better but it still not the exact thing I need. It looks like a
> "tree view" thing.
That is what the standard dialog uses, yes.
> I need a standard file open/save folder look.
There is no such standard dialog for selecting and managing folders like
that. You will have to create your own.
Gambit
To the original poster - you can ignore this, as it shows the tree view
you said you did not want in another post. I didn't have the newsgroup
threaded properly, so didn't see that message in time.
--
Jon Purvis
Wildlife Technical Programs Lead
Texas Parks and Wildlife Department
Austin, TX
Michael Shkolnik is the man - this link has everything you'd need.
http://www.scalabium.com/faq/dct0157.htm