// Show a context menu for Rich Edit controls (the standard
// EDIT control has one already)
- void OnRightClick(wxMouseEvent& event);
+ void OnContextMenu(wxContextMenuEvent& event);
// be sure the caret remains invisible if the user
// called HideNativeCaret() before
EVT_DROP_FILES(wxTextCtrl::OnDropFiles)
#if wxUSE_RICHEDIT
- EVT_RIGHT_UP(wxTextCtrl::OnRightClick)
+ EVT_CONTEXT_MENU(wxTextCtrl::OnContextMenu)
#endif
EVT_MENU(wxID_CUT, wxTextCtrl::OnCut)
event.Enable(GetLastPosition() > 0);
}
-void wxTextCtrl::OnRightClick(wxMouseEvent& event)
+void wxTextCtrl::OnContextMenu(wxContextMenuEvent& event)
{
#if wxUSE_RICHEDIT
if (IsRich())
m_privateContextMenu->AppendSeparator();
m_privateContextMenu->Append(wxID_SELECTALL, _("Select &All"));
}
- PopupMenu(m_privateContextMenu, event.GetPosition());
+ PopupMenu(m_privateContextMenu);
return;
}
else