kenneth quirici

kenneth quirici

  • NA
  • 378
  • 1.5k

how do i add a menu to a button

May 1 2021 2:48 AM
Specifically, I have a button called 'utilityButton'. When I right-click this I want it to display a drop-down menu with 2 items: test1 & test2.
 
I've defined a ContextMenu called utilityMenu with these two options and attached it to the utilityButton:
 
utilityButton.ContextMenu = utilityMenu.
 
This doesn't acttually seem to be implemented according to the Buttons Class documentation for Windows Forms. 
 
So I can't get it to appear. I right- and left-click the button and nothing happens.
 
Any help appreciated.
 
Thanks!
 
Ken 
 
 

Answers (1)