Re: Filter what the FolderBrowserDialog shows?
Peter Ritchie <[email protected]> Mon, 27 Aug 2007 18:02:54 -0400
| Newsgroups | gmane.comp.windows.devel.dotnet.winforms |
|---|---|
| Message-ID | <LISTSERV%[email protected]> |
FolderBrowserDialog is a wrapper for SHBrowseForFolder which does support custom filtering; but FolderBrowserDialog doesn't implement that particular feature. You'd have to re-write FolderBrowserDialog to do what you want. Even if it wasn't sealed you'd have to re-write most of code (RunDialog override and the callback method) anyway. http://msdn2.microsoft.com/en-us/library/ms647664.aspx describes the detail of FolderBrowseDialog and the use of the IFilterSite interface to do the custom filtering. Arik Poznanski wrote a series of articles on shell programming in C# that included a bit of detail on custom filters in the first of the series: http://www.codeproject.com/csharp/csdoesshell1.asp. HTH On Mon, 27 Aug 2007 14:11:03 -0600, Bhatnagar, Amit <[email protected]> wrote: >Using the FolderBrowserDialog, is there a way to filter what directories >that it shows? For example, say I only want the user to pic folders that >end in the word "Mail" or something. If the FolderBrowserDialog doesn't >support this, would I have to create a custom folder picker and filter >the list manually?