Hi folks.
I'd like a FolderBrowserDialog which only enables the "OK" button if the selected directory contains certain files/folders. Does such a thing exist or am I on my own?
Thanks for your time,
T
Printable View
Hi folks.
I'd like a FolderBrowserDialog which only enables the "OK" button if the selected directory contains certain files/folders. Does such a thing exist or am I on my own?
Thanks for your time,
T
I think you have to do it by yourself. There is a FolderBrowserDialog in the framework, but that dialog enables the Ok button if a folder is selected. In my opinion it is the correct behavier. Because it is a generic folder browser and not a nonempty folder browser.
I do not know for what do you want that special folder browser, but you could check the directory after selecting and if the directory is empty you can push up a message box and the dialog again. Should save a lot of time because you do not have to implement your own user control folder dialog.
Yeah not quite so nice though - I only want to be allowing selection if the folder contains some specific files; like the "insert installation disk" idea.
Never mind - don't ask, don't get! Thanks for your input.
T