EVT_KILL_FOCUS(wxRichTextCtrl::OnKillFocus)
EVT_MOUSE_CAPTURE_LOST(wxRichTextCtrl::OnCaptureLost)
EVT_CONTEXT_MENU(wxRichTextCtrl::OnContextMenu)
+ EVT_SYS_COLOUR_CHANGED(wxRichTextCtrl::OnSysColourChanged)
EVT_MENU(wxID_UNDO, wxRichTextCtrl::OnUndo)
EVT_UPDATE_UI(wxID_UNDO, wxRichTextCtrl::OnUpdateUndo)
}
/// Right-click
-void wxRichTextCtrl::OnRightClick(wxMouseEvent& WXUNUSED(event))
+void wxRichTextCtrl::OnRightClick(wxMouseEvent& event)
{
SetFocus();
cmdEvent.SetEventObject(this);
cmdEvent.SetPosition(m_caretPosition+1);
- GetEventHandler()->ProcessEvent(cmdEvent);
+ if (!GetEventHandler()->ProcessEvent(cmdEvent))
+ event.Skip();
}
/// Left-double-click
sm_availableFontNames.Clear();
}
+void wxRichTextCtrl::OnSysColourChanged(wxSysColourChangedEvent& WXUNUSED(event))
+{
+ //wxLogDebug(wxT("wxRichTextCtrl::OnSysColourChanged"));
+
+ wxTextAttrEx basicStyle = GetBasicStyle();
+ basicStyle.SetTextColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT));
+ SetBasicStyle(basicStyle);
+ SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
+
+ Refresh();
+}
+
#endif
// wxUSE_RICHTEXT