Windows Forms application using VS2022 CE. I have a 'browse' button for selecting the folder of interest, as shown in the following snippet:
private void btn_Browse_Click(object sender, EventArgs e)
{
folderBrowserDialog1.Description = "Choose the folder containing crossword print files";
folderBrowserDialog1.RootFolder = Environment.SpecialFolder.MyDocuments;
if (folderBrowserDialog1.ShowDialog() == DialogResult.OK)
{
tb_Folder.Text = folderBrowserDialog1.SelectedPath;
}
}
This all worked OK until I decided to add code to set the root directory for the search. After the 'RootFolder' property was set, the 'Documents' folder shows up in the dialog but it can't be expanded. What am I doing wrong here?
Before (without the RootFolder property line):