How to associate a menu item with a toolbarbutton?

  • Thread starter Thread starter supermonkey
  • Start date Start date
S

supermonkey

As we all known, a menuItem often has a corresponding toolbar button in a
windows form program.

I want to associate a menuItem with corresponding toobarbutton which has the
same action with it. So that when I check a menuItem, the toolbarbutton will
also looks like "pressed".

In MFC, we call achieve this purpose by seting them to the same ID, but how
to implement this in C#??


Thank you very much!
 
There is no built-in way. You have to do it my hand.

You could fire the toolbar button's click event when the menu item is
clicked.
 
Back
Top