Subclass the BindingNavigator

I would like to subclass the BindingNavigator so I can change the baseclass of the ToolStripButtons to GToolStripButton which adds some functionality to the ToolStripButton class.

When I subclass the ToolStripButton, I end up with a class which does not show in the ToolBox, and so I cannot drag and drop onto a BindingNavigator.

In fact, the only way to add a button to the BindingNavigator in the designer is to use the designer itself. But this prevents me from specifying a bass class for the buttons.

Suggestions appreciated.

Greg Gum

[570 byte] By [SuperFox] at [2007-12-23]
# 1

It is in fact possible to subclass a ToolStrip button and then use it in a toolbar or BindingNavigator. The trick is that the subclass does not show up in the Toolbox, but in the designer itself. In other words, when you get the dropdown in the toolbar itself to add a button or other control, your subclass which show up at the bottom of the list. I found this by chance. It's a nice feature if you need subclassed buttons or other toolbar items.

Greg Gum

SuperFox at 2007-8-30 > top of Msdn Tech,Windows Forms,Windows Forms Data Controls and Databinding...