]> git.saurik.com Git - wxWidgets.git/commitdiff
don't steal EVT_RIGHT_UP in rich edit controls for context menu (patch 1143823)
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 19 Feb 2005 17:27:30 +0000 (17:27 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 19 Feb 2005 17:27:30 +0000 (17:27 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32198 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/msw/textctrl.h
src/msw/textctrl.cpp

index e19c77eb7d63f66b8988aaeceb7cf6cd4a600086..3f09055cdfaae2bb9a50ac13540f096a3fb0f453 100644 (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
index 1a072cfae3f89388332eec27de8bc243b7f95948..2f4136d212893849be5b9360842a94c5f8fa8cd0 100644 (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