简体   繁体   English

如何过滤FolderBrowserDialog,或者有什么替代方法?

[英]How can I filter a FolderBrowserDialog, or what's an alternative?

I need to restrict folders in a FolderBrowserDialog that appear by default. 我需要限制默认显示的FolderBrowserDialog中的文件夹。 For instance, "Homegroup", "Recycle Bin", "Control Panel" etc. Is there any way to work with the existing FolderBrowserDialog, or do I need to look at an alternative control? 例如,“家庭组”,“回收站”,“控制面板”等。是否可以使用现有的FolderBrowserDialog进行操作,还是需要查看其他控件?

您无法从应用程序中执行此操作,但必须创建自己的用户控件。

Not a complete answer to your question, but if you set the FolderBrowserDialog.RootFolder 不是您问题的完整答案,但是如果您设置FolderBrowserDialog.RootFolder
you get 你得到
Only the specified folder and any subfolders that are beneath it will appear in the dialog box and be selectable. (From MSDN) (来自MSDN)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在 LINQPad 中显示 FolderBrowserDialog? - How can I display a FolderBrowserDialog in LINQPad? 如何防止FolderBrowserDialog崩溃? - How can I prevent FolderBrowserDialog to crash? 如何检查 FolderBrowserDialog 的内容是否为空? - How can I check the content of the FolderBrowserDialog if is it empty or not? 如何使用FolderBrowserDialog保存和加载用户最后选择的文件夹? - How can I save and load the last selected folder by user with FolderBrowserDialog? 如何在Visual Studio 2019中使用FolderBrowserDialog? - How can I use FolderBrowserDialog in Visual Studio 2019? 如何使用 FolderBrowserDialog 或类似的东西提示用户输入文件夹? - How can I prompt the user for a folder using a FolderBrowserDialog or something like it? Web 表单中 FolderBrowserDialog 的替代品 - alternative to FolderBrowserDialog in web forms 我可以更改FolderBrowserDialog的标题吗? - Can I change the title of my FolderBrowserDialog? 所以我不能做gameObject.AddComponent(StringVariable); 了……还有什么选择? - So I can't do gameObject.AddComponent(StringVariable); anymore… What's the alternative? 位图的替代方法是什么,以便我可以在它的像素中存储双精度/浮点值,而无需转换为整数/字节? - What is the alternative to Bitmap so that I can store double/float values in it's pixels without casting to int/byte?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM