So I have this program that involves the user using FolderBrowserDialog.
And it works fine ... but the rub is, when the user comes back around and uses the dialog again, the directory is highlighted, but not expanded, and he's asking that it be expanded.
LOL! For the life of me, I can't figure out how to expand the selected directory when the dialog is redisplayed.
private void dirSelect_Click(object sender, EventArgs e)
{
FolderBrowserDialog f = new FolderBrowserDialog();
if (dirTextBox.Text != string.Empty)
{
f.SelectedPath = dirTextBox.Text; [B]<---- Right here is where I not
only want to select the dir
he selected prviously, but
expand it for him as well so
he sees the sub-folders without
having to click on it.[/B]
}
DialogResult result = f.ShowDialog();
if (result == DialogResult.OK)
{
//Add the selected directory to the textbox.
dirTextBox.Text = f.SelectedPath + @"\";
}
}
I did try to programatically execute the "on click" event, but that just got me into all kinds of trouble.
As always, thanks guys.