right click event for wxDataViewListCtrl

35 Views Asked by At

Originally in wxDataViewListCtrl it supports event of the right click only on the headers. I would like to let the table also react when I right click on it and a menu pops up.

Neither Bind nor Connect works.

What do I actually miss to add this event to the ctrl?

Neither

Bind(wxEVT_RIGHT_DOWN, &MyClass::MyFunc, this, ID_DATA_VIEW_LIST_CTRL)

nor

Connect(ID_DATA_VIEW_LIST_CTRL, wxEVT_RIGHT_DOWN,
    wxMouseEventHandler(MyClass::MyFunc), NULL, this)

works to make the DataViewListCtrl react to mouse right click.

0

There are 0 best solutions below