![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
The Control class offers a ContextMenuStrip so that you can assign a menu to be automatically displayed when the control is right-clicked. That's nice. Why then don't the more complex controls provide you with an easy way of determining WHAT was clicked? |
#3
| |||
| |||
|
|
The Control class offers a ContextMenuStrip so that you can assign a menu to be automatically displayed when the control is right-clicked. That's nice. Why then don't the more complex controls provide you with an easy way of determining WHAT was clicked? Actually, they do. See `TreeView.HitTest' and `TreeView.GetNodeAt' methods. |
#4
| |||
| |||
|
|
Actually, they do. See `TreeView.HitTest' and `TreeView.GetNodeAt' methods. No, that's not what I call easy; that's the code I'm expecting to have to write. I think the tree view control should provide ContextMenuTarget and ContextMenuTargetType properties which I can just reference directly from the Click event of the menu item. |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |