How to associate a menu item with a toolbarbutton?

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!
 
B

Bryan Phillips

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top