定制的浏览文件夹对话框中显示的路径 [英] Customising the browse for folder dialog to show the path
问题描述
有谁知道什么是定制System.Windows.Forms.FolderBrowserDialog这样的路径可以在树下一个文本框使用文本输入的最简单的方法。
Does anyone know what is the simplest way to customise the System.Windows.Forms.FolderBrowserDialog so a path can be entered using text in a textbox below the tree.
我想要这个,所以很容易选择映射的UNC路径。
I want this so it's easy to select unmapped UNC paths.
看起来这此KB 有一定的支持信息。
Looks like this this KB has some supporting information.
推荐答案
就在这个周末,我需要这个。我找了又找,但找不到它。使出写我自己,基于知识库文章,和其他一些东西。在这里,雅去。 <一href=\"http://www.$c$cplex.com/DotNetZip/SourceControl/changeset/view/29499#432677\">FolderBrowserDialogEx
Just this weekend I needed this. I looked and looked but could not find it. Resorted to writing it myself, based on that KB article, and some other things. Here ya go. FolderBrowserDialogEx
全部来源$ C $ C。自由。 MS-公共许可证。
Full Source code. Free. MS-Public license.
code使用它:
var dlg1 = new Ionic.Utils.FolderBrowserDialogEx();
dlg1.Description = "Select a folder to extract to:";
dlg1.ShowNewFolderButton = true;
dlg1.ShowEditBox = true;
//dlg1.NewStyle = false;
dlg1.SelectedPath = txtExtractDirectory.Text;
dlg1.ShowFullPathInEditBox = true;
dlg1.RootFolder = System.Environment.SpecialFolder.MyComputer;
// Show the FolderBrowserDialog.
DialogResult result = dlg1.ShowDialog();
if (result == DialogResult.OK)
{
txtExtractDirectory.Text = dlg1.SelectedPath;
}
功能:节目编辑框,显示在编辑框中的完整路径。可以用来浏览打印机或计算机,以及文件+夹,或者仅仅夹。
Capabilities: shows editbox, shows full path in edit box. Can be used to browse printers or computers, as well as files+folders, or just folders.
这篇关于定制的浏览文件夹对话框中显示的路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!