0

I have tried this solution and it works beautifully FolderBrowserDialogEx but now I have to add another button which will be placed next to editbox and upon clicking will show a particular folder always. I have tried this so far.

In the constructor:

btnDefault = new Button();
btnDefault.Text = "Default";
btnDefault.Enabled = true;
btnDefault.Click +=new EventHandler(btnDefault_Click);

on click

private void btnDefault_Click(object sender, EventArgs e)
{            
    _selectedPath = @"C:\ProgramData";
}

How do I add new Button? Full code is available HERE

Thank you for any help.

Community
  • 1
  • 1
hima
  • 610
  • 3
  • 10
  • 24
  • Quote from the link: "First, we need to realize that the Folder Browser dialog is not a .NET control, but is rather the Common Dialog and is part of Windows". You can't add a button. – Hans Passant Aug 06 '14 at 13:51
  • @HansPassant, then does it mean the EditBox which is shown(to show the selected path) is inbuilt too? – hima Aug 06 '14 at 14:02
  • That one is built into the Windows dialog. – Hans Passant Aug 06 '14 at 14:09

0 Answers0