What control is this? ("Open" Button with Drop Down)

I used the draggable search in Spy++ (installed with VS) to look at the split open button on the file-open dialog of VS.

This revealed that it's an ordinary windows button with a style which includes BS_DEFSPLITBUTTON. That's a magic keyword which gets you to some interesting places, including

http://www.codeplex.com/windowsformsaero/SourceControl/FileView.aspx?itemId=212902&changeSetId=9930

and here

http://msdn.microsoft.com/en-us/library/bb775949.aspx#using_splits

Hope this helps you.

EDIT:

I've actually just tried that code from CodePlex and it does create a split button - but you do have to make sure you've set the button's FlatStyle to 'System' rather than 'Standard' which is the default. I've not bothered to hook-up the event handling stuff for the drop-down, but that's covered in the MSDN link, I think.

Of course, this is Vista-only (but doesn't need Aero enabled, despite the name on codeplex) - if you need earlier OS support, you'll be back to drawing it yourself.


I remembered that Ketarin has a button like that.

Using Reflector I found great open source control called wyDay.SplitButton. wyDay.SplitButton