FolderBrowserDialog
-
Hi, im developing an application in c# .net 1.1 using VS2k3. In that app I'm trying to open a System.Windows.Forms.FolderBrowserDialog. Here is the code:
System.Windows.Forms.FolderBrowserDialog folderBrowserDialog = new FolderBrowserDialog(); folderBrowserDialog.SelectedPath = System.Environment.CurrentDirectory; folderBrowserDialog.ShowNewFolderButton = true; DialogResult res = folderBrowserDialog.ShowDialog(this.maindlg); if(res == DialogResult.OK) { ... //do something }
It works just great, except that when I click on the "Create new directory" button, a new directory will be created, but not shown in the dialog. When I close the dialog and start it again, then the new created dir will be shown. So there is a need to refresh the directory list in the dialog when the user hits the "create new dir" button. Does anyone know how I can perform this? thx and best regards :) ~Humppa -
Hi, im developing an application in c# .net 1.1 using VS2k3. In that app I'm trying to open a System.Windows.Forms.FolderBrowserDialog. Here is the code:
System.Windows.Forms.FolderBrowserDialog folderBrowserDialog = new FolderBrowserDialog(); folderBrowserDialog.SelectedPath = System.Environment.CurrentDirectory; folderBrowserDialog.ShowNewFolderButton = true; DialogResult res = folderBrowserDialog.ShowDialog(this.maindlg); if(res == DialogResult.OK) { ... //do something }
It works just great, except that when I click on the "Create new directory" button, a new directory will be created, but not shown in the dialog. When I close the dialog and start it again, then the new created dir will be shown. So there is a need to refresh the directory list in the dialog when the user hits the "create new dir" button. Does anyone know how I can perform this? thx and best regards :) ~Humppa -
Hi, thanks for your reply. I checked it out with .ShowDialog():
System.Windows.Forms.FolderBrowserDialog folderBrowserDialog = new FolderBrowserDialog(); folderBrowserDialog.SelectedPath = System.Environment.CurrentDirectory; folderBrowserDialog.ShowNewFolderButton = true; DialogResult res = folderBrowserDialog.ShowDialog(); if(res == DialogResult.OK) { ... //do something }
Unfortunatelly there is still the same problem. Please note that I'm running on WindowsXP and that the code is part of an internal class which is not inherited from UserControl or Form. ~Humppa -
Hi, im developing an application in c# .net 1.1 using VS2k3. In that app I'm trying to open a System.Windows.Forms.FolderBrowserDialog. Here is the code:
System.Windows.Forms.FolderBrowserDialog folderBrowserDialog = new FolderBrowserDialog(); folderBrowserDialog.SelectedPath = System.Environment.CurrentDirectory; folderBrowserDialog.ShowNewFolderButton = true; DialogResult res = folderBrowserDialog.ShowDialog(this.maindlg); if(res == DialogResult.OK) { ... //do something }
It works just great, except that when I click on the "Create new directory" button, a new directory will be created, but not shown in the dialog. When I close the dialog and start it again, then the new created dir will be shown. So there is a need to refresh the directory list in the dialog when the user hits the "create new dir" button. Does anyone know how I can perform this? thx and best regards :) ~Humppa -
Hi, im developing an application in c# .net 1.1 using VS2k3. In that app I'm trying to open a System.Windows.Forms.FolderBrowserDialog. Here is the code:
System.Windows.Forms.FolderBrowserDialog folderBrowserDialog = new FolderBrowserDialog(); folderBrowserDialog.SelectedPath = System.Environment.CurrentDirectory; folderBrowserDialog.ShowNewFolderButton = true; DialogResult res = folderBrowserDialog.ShowDialog(this.maindlg); if(res == DialogResult.OK) { ... //do something }
It works just great, except that when I click on the "Create new directory" button, a new directory will be created, but not shown in the dialog. When I close the dialog and start it again, then the new created dir will be shown. So there is a need to refresh the directory list in the dialog when the user hits the "create new dir" button. Does anyone know how I can perform this? thx and best regards :) ~Humppa