don't steal EVT_RIGHT_UP in rich edit controls for context menu (patch 1143823)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32198 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2005-02-19 17:27:30 +00:00
parent 51d2fa37c4
commit 26f60eb6a4
2 changed files with 4 additions and 4 deletions

View File

@ -188,7 +188,7 @@ public:
// 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

View File

@ -212,7 +212,7 @@ BEGIN_EVENT_TABLE(wxTextCtrl, wxControl)
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)
@ -2030,7 +2030,7 @@ void wxTextCtrl::OnUpdateSelectAll(wxUpdateUIEvent& event)
event.Enable(GetLastPosition() > 0);
}
void wxTextCtrl::OnRightClick(wxMouseEvent& event)
void wxTextCtrl::OnContextMenu(wxContextMenuEvent& event)
{
#if wxUSE_RICHEDIT
if (IsRich())
@ -2048,7 +2048,7 @@ void wxTextCtrl::OnRightClick(wxMouseEvent& event)
m_privateContextMenu->AppendSeparator();
m_privateContextMenu->Append(wxID_SELECTALL, _("Select &All"));
}
PopupMenu(m_privateContextMenu, event.GetPosition());
PopupMenu(m_privateContextMenu);
return;
}
else