ListView can display a single context menu, but the developer has to test for mouse position, if needs specific items in the context menu, depending on where the user clicked.
Better ListView allows settings three distinct context menu via properties:
ContextMenuStrip
- global context menu, used when uses clicks on client area (or on column header/item when the specific menu is not set)ContextMenuStripColumnHeaders
- context menu for column headersContextMenuStripItems
- context menu for itemsThese are of type System.Windows.Forms.ContextMenuStrip
.
The ContextMenuSample application simply displays a Better ListView with one column header and one item.
There are three context menus attached to column header, item and client area of the Better ListView.