I have a ListView with ViewStyle = vsReport
and two popup menus:
- Column popup menu, which I want to open when user right-clicking the header bar
- Item popup menu, must open when the user right-clicking any list item/subitem or whitespace below items.
What is the most correct way to show that menus? Which events should I handle?
The problem is when I set ListView.PopupMenu
property, the popup menu appearing after right-clicking any point in ListView's client rectangle.
When I handle ListView.OnColumnRightClick
event, if fires only after clicking on column header, excluding free space of the header bar (on the right of columns).
Event LisView.OnMouseUp
fires only after right-clicking on whitespace below items.
PopupMenuItems
menu popup only when you're over an item or even when you're over subitem ? – TLama