did anyone got wxGrid to respond to the EVT_CONTEXT_MENU event-handler? I am using a derived class from wxGrid, declared an event table and used EVT_CONTEXT_MENU in it but the handler function is not called:
Code: Select all
class CMyGrid : public wxGrid
{
...
protected:
void OnContextMenu(wxContextMenuEvent& event);
DECLARE_EVENT_TABLE();
...
};
BEGIN_EVENT_TABLE(CMyGrid, wxGrid)
EVT_CONTEXT_MENU(OnContextMenu);
END_EVENT_TABLE
void CMyGrid::OnContextMenu(wxContextMenuEvent& event)
{
wxMessageBox(wxT("TEST"));
}
Any ideas about this? There must be an error somewhere but I was not able to locate it I also checked this forum but didn't find a solution for the problem.
Thanks in advance,
Jens