C# WFA 在列表中显示打开的文件对话
因此,将我的 openFileDialog 与 Windows 窗体应用程序一起使用 - 我拥有它,因此当我单击按钮时,它允许我选择一个包含以下代码的文件。
{
openFileDialog1.InitialDirectory = "Desktop";
openFileDialog1.Title = "Select Mod Folder";
openFileDialog1.FileName = "";
openFileDialog1.ShowDialog();
}
然后我得到了我想要显示所选文件的列表,并且使用该程序的人可以选中他们想要的单个程序的复选框。
我不太确定应该将哪些内容放入
// checkedListBox1
//
this.checkedListBox1.AllowDrop = true;
this.checkedListBox1.CheckOnClick = true;
this.checkedListBox1.FormattingEnabled = true;
this.checkedListBox1.Location = new System.Drawing.Point(12, 40);
this.checkedListBox1.Name = "checkedListBox1";
this.checkedListBox1.ScrollAlwaysVisible = true;
this.checkedListBox1.Size = new System.Drawing.Size(217, 304);
this.checkedListBox1.TabIndex = 8;
this.checkedListBox1.SelectedIndexChanged += new System.EventHandler(this.checkedListBox1_SelectedIndexChanged);
//
我正在使用的 Microsoft Visual列表中
So, using my openFileDialog with Windows Form Application - I have it so when I click a button, it allows me to select a file which is the following code.
{
openFileDialog1.InitialDirectory = "Desktop";
openFileDialog1.Title = "Select Mod Folder";
openFileDialog1.FileName = "";
openFileDialog1.ShowDialog();
}
Then I got my list where I want the selected file to show up and the person using the program can check boxes for which individual program they want.
I'm not exactly sure what I should put into the list
// checkedListBox1
//
this.checkedListBox1.AllowDrop = true;
this.checkedListBox1.CheckOnClick = true;
this.checkedListBox1.FormattingEnabled = true;
this.checkedListBox1.Location = new System.Drawing.Point(12, 40);
this.checkedListBox1.Name = "checkedListBox1";
this.checkedListBox1.ScrollAlwaysVisible = true;
this.checkedListBox1.Size = new System.Drawing.Size(217, 304);
this.checkedListBox1.TabIndex = 8;
this.checkedListBox1.SelectedIndexChanged += new System.EventHandler(this.checkedListBox1_SelectedIndexChanged);
//
I'm using Microsoft Visual
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
该列表是用竖线分隔的。
C# 文件|c#|VB 文件|.vb
您可以参考此以获取更多信息...
http://msdn.microsoft.com/en -us/library/system.windows.forms.filedialog.filter.aspx
The list is pipe delimited.
C# Files|c#|VB Files|.vb
You may reference this for more information...
http://msdn.microsoft.com/en-us/library/system.windows.forms.filedialog.filter.aspx