FolderBrowserDialog C # SelectedPath always shows at the bottom

im opens FolderBrowserDialog like this:

        FolderBrowserDialog fbd = new FolderBrowserDialog();
        fbd.Description = desc;
        fbd.SelectedPath = defaultPath;
        fbd.ShowNewFolderButton = showNewFolderButton;
        DialogResult result = fbd.ShowDialog();

        if (result == System.Windows.Forms.DialogResult.OK)
            return fbd.SelectedPath + @"\";
        else
            return ""; 

      

It works. But every time I select a new folder in this dialog, the entire Folder Tree scrolls down so that the selected folder is at the bottom of the FolderBrowserDialog. This is getting pretty annoying because I always have to scroll down to select a different folder ...

Any solution for this?

thank!

+3


source to share


1 answer


I was able to reproduce what you see in Windows 7. This is only happening the first time. So if you shrink an extended folder and try to push it again, it doesn't move the selected folder down, but stays where it is and expands the subfolders below it. This does not happen if we use the cursor arrow to expand the folder. Sometimes I see the selected folder even move up to show all the contents. This could be by design or a minor mistake.



+1


source







All Articles