开发者

Folder Browser Dialog

I am using Folder Browser Dialog in my application to select a folder. Now I want such a thing that in the folder there should be only html files nothing else to be selected. Like if we have open file dialog and only we want to display html file then we use filter property of openfiledialog.So how can I do that in folder browser dialog to remain or select only html files in the folder ?

That is how can I filter files in the folder browser dialog ?

EDIT selec开发者_Go百科t only folders containing .HTML.


You are asking, and you emphasize in your Edit, to use a FolderBrowser to select files. That is a contradiction. Just use a FileOpen dialog with a *.HTML filter.

Maybe you meant: select only folders containing .HTML, but there is no built in support for that.

Edit

You'll have to think about what this means for nested folders. You would need something that looks ahead at least one level, but any subdir could potentially have HTML files (a few levels down).


Use this as your filter:

HTML files (*.htm; *.html)|*.htm;*.html|All files (*.*)|*.*


Is there any particular reason you would use a folder browser dialog when you're selecting a file? An open file dialog is filterable and should be what you're using for file selection.

To get to the real answer: afaik, it's not possible to filter the folder browser dialog.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜