Friday, February 18, 2011

FolderBrowserDialogEx - A C# Wrapper for SHBrowseForFolder

CodeProject - FolderBrowserDialogEx: A C# customization of FolderBrowserDialog

"Introduction

We've all used FolderBrowserDialog and its precursor SHBrowseForFolder. While these common controls are very useful in stock form, they never quite seem to do exactly what you want - there's always some UI artifact that you really don't want. And, like many things in .NET, the managed API seems to be a thin wrapper around the unmanaged API, and the managed API therefore inherits all the quirks.

I had a few gripes about FolderBrowserDialog, especially:

  • The stock "Browse For Folder" dialog title... I want to say something more informative.
  • There's no option for a path edit box... it's in SHBrowseForFolder but disappeared in FolderBrowserDialog.

..."

Here's a snap of the sample app;

image

image

image

I REALLY like have the Folder edit/textbox on my Folder Browser dialogs. All to often I have a folder path already on the clipboard and waiting to be pasted when I run into this dialog. And in most cases, there's no folder textbox, so I have to click my way to the given folder... (grumbling the whole way)

Needless to say, when I saw this CodeProject I wanted to be sure to capture it here in my remote, cloud based, full text searchable memory store... ;)

1 comment:

  1. FolderBrowseDialog is a terrible UI via TreeView interface. I prefer use "OpenFileDialog" UI to select a folder. But not found in this world.

    ReplyDelete

NOTE: Anonymous Commenting has been turned off for a while... The comment spammers are just killing me...

ALL comments are moderated. I will review every comment before it will appear on the blog.

Your comment WILL NOT APPEAR UNTIL I approve it. This may take some hours...

I reserve, and will use, the right to not approve ANY comment for ANY reason. I will not usually, but if it's off topic, spam (or even close to spam-like), inflammatory, mean, etc, etc, well... then...

Please see my comment policy for more information if you are interested.

Thanks,
Greg

PS. I am proactively moderating comments. Your comment WILL NOT APPEAR UNTIL I approve it. This may take some hours...