bool wxRichTextCtrl::Create( wxWindow* parent, wxWindowID id, const wxString& value, const wxPoint& pos, const wxSize& size, long style,
const wxValidator& validator, const wxString& name)
{
- // Try to make this only necessary in 2.8
-#if 0
-#ifdef __WXMSW__
- if ((style & wxBORDER_MASK) == wxDEFAULT)
- style |= wxBORDER_THEME;
-#endif
-#endif
-
if (!wxTextCtrlBase::Create(parent, id, pos, size,
style|wxFULL_REPAINT_ON_RESIZE,
validator, name))
event.Enable(GetLastPosition() > 0);
}
-void wxRichTextCtrl::OnContextMenu(wxContextMenuEvent& WXUNUSED(event))
+void wxRichTextCtrl::OnContextMenu(wxContextMenuEvent& event)
{
+ if (event.GetEventObject() != this)
+ {
+ event.Skip();
+ return;
+ }
+
if (!m_contextMenu)
{
m_contextMenu = new wxMenu;