Search code examples
c#contextmenuobjectlistview

ContextMenuStrip stops working on blank area in ObjectListView


In my .NET 4.0 WinForms app I have ObjectListView 2.5.1.18477 and a ContextMenuStrip associated with it.

The context menu displays fine when I right click on a data row in the ObjectListView, but if I right click on a blank area, such as the red cross, then the context menu never shows again on the ObjectListView no matter where I click.

How can I get the context menu to keep displaying no matter where I click in the ObjectListView?

Thanks

enter image description here

enter image description here


Solution

  • Ah. Some other code was catching the mouse event and failing.