How can I prompt the user for a folder using a FolderBrowserDialog or something like it?

Go To StackoverFlow.com

1

I want to prompt the user for a folder, but allow them the possibility of pasting in a path. The FolderBrowswerDialog doesn't seem to support this. I thought about using an OpenFileDialog, but that requires the user to select a file, which I don't want - though it does allow a user to type or paste in a path.

How can I have the user select a folder, but also allow them to type or paste in a path (to the folder)?

2012-04-05 22:01
by Aerik
http://stackoverflow.com/questions/576741/customising-the-browse-for-folder-dialog-to-show-the-path/580706#58070 - Cheeso 2012-04-05 22:02
Wow, everything from that page is very "heavy"... I was really hoping for something easier. Oh well - Aerik 2012-04-05 22:13
You don't need to worry about the "heavy" code. Just use it like any other component. Drop it in, and use it. No need to open the lid - Cheeso 2012-04-05 22:27
@Cheeso So it looks like this is a duplicate question, but if you'll put that as an answer, I'll accept it. thanks - Aerik 2012-04-12 21:29
I voted to close this one. Eventually it will reach the requisite # of votes - Cheeso 2012-04-12 22:23
ok, I voted to close it to - Aerik 2012-04-12 22:26


0

What you can do is making a form with a textbox and folderbrowsedialog. Then the user can either paste or type in the folder address (Then you have to validate it) or just use the folderbrowsedialog in it.

Then just show this form as a dialog whenever user wants to use it.

2012-04-06 01:21
by Saeid Yazdani
Ads