Assigning a ContextMenu to a UserControl
Posted on 2004-03-25
I have a user control made up of a textbox, listview, scrollbar and a picturebox. It is basically a combo box but with extra functionality. The problem I have is when I assign a contextmenu to my usercontrol the only thing that will show the context menu is the picturebox.
I can assign it to individual items in the usercontrol but when the user clicks a menu item on the contextmenu I want to know which usercontrol the click came from and the sourcecontrol property is actually the indivdual item I assigned it to.
So what I want to know is how to assign a context menu to a usercontrol as a whole.