Is there an OpenFileOrFolderDialog object in .NET?

前端 未结 6 992
清酒与你
清酒与你 2021-01-12 08:36

Is it possible to use the OpenFileDialog class select a file OR folder? It appears only to allow the selection of a file, if you select a folder and then choose open it wil

6条回答
  •  既然无缘
    2021-01-12 09:29

    If you have time, you can create your own pretty easily by using the System.Windows.Forms.TreeView Class. Each node can have a checkbox, so If you populate the treeview (onexpand) you can let the user select the files/directories he wants to upload.

    This should get you started on populating the treeview with directories, the job to also add files in the treeview should not be that hard:

    http://www.java2s.com/Tutorial/VB/0280__GUI-Applications/FileTreeview.htm

提交回复
热议问题