context menu and controls

  • Thread starter Thread starter Bernie Yaeger
  • Start date Start date
B

Bernie Yaeger

The context menu is a form level control. Is there a way to affix a context
menu, not to the form, but rather to one of the controls instead?

Thanks for any help.

Bernie Yaeger
 
Hey, nevermind - I just read a response from Cor to another question that
answered me! Tx anyway. You just define the context menu in the property
grid of the designer to the control in question.

Bernie
 
Bernie Yaeger said:
The context menu is a form level control. Is there a way to affix a
context menu, not to the form, but rather to one of the controls instead?


Assign the contextmenu to the control's 'ContextMenu' property. If you need
a reference to the control the context menu was shown on, you can check the
contextmenu's 'SourceControl' property when an item was clicked.
 
Tx Herfried - I saw a post that answered the question just before you
responded.

Bernie
 
Back
Top