]> git.saurik.com Git - wxWidgets.git/blobdiff - src/richtext/richtextctrl.cpp
Move the wxDL_ macros to wxDynLibrary
[wxWidgets.git] / src / richtext / richtextctrl.cpp
index e54db2ca1aae9c44253b703313862b6d3ced44df..c4249b0d1bbc3df5702ec502e6a0dd2c02e5bb6f 100644 (file)
@@ -151,7 +151,7 @@ bool wxRichTextCtrl::Create( wxWindow* parent, wxWindowID id, const wxString& va
     // The base attributes must all have default values
     wxTextAttrEx attributes;
     attributes.SetFont(GetFont());
     // The base attributes must all have default values
     wxTextAttrEx attributes;
     attributes.SetFont(GetFont());
-    attributes.SetTextColour(*wxBLACK);
+    attributes.SetTextColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT));
     attributes.SetAlignment(wxTEXT_ALIGNMENT_LEFT);
     attributes.SetLineSpacing(10);
     attributes.SetParagraphSpacingAfter(10);
     attributes.SetAlignment(wxTEXT_ALIGNMENT_LEFT);
     attributes.SetLineSpacing(10);
     attributes.SetParagraphSpacingAfter(10);
@@ -166,7 +166,7 @@ bool wxRichTextCtrl::Create( wxWindow* parent, wxWindowID id, const wxString& va
     wxTextAttrEx defaultAttributes;
     SetDefaultStyle(defaultAttributes);
 
     wxTextAttrEx defaultAttributes;
     SetDefaultStyle(defaultAttributes);
 
-    SetBackgroundColour(*wxWHITE);
+    SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
     SetBackgroundStyle(wxBG_STYLE_CUSTOM);
 
     // Tell the sizers to use the given or best size
     SetBackgroundStyle(wxBG_STYLE_CUSTOM);
 
     // Tell the sizers to use the given or best size
@@ -1047,7 +1047,7 @@ bool wxRichTextCtrl::ScrollIntoView(long position, int keyCode)
 
     // Going down
     if (keyCode == WXK_DOWN || keyCode == WXK_NUMPAD_DOWN ||
 
     // Going down
     if (keyCode == WXK_DOWN || keyCode == WXK_NUMPAD_DOWN ||
-        keyCode == WXK_RIGHT || keyCode == WXK_NUMPAD_DOWN ||
+        keyCode == WXK_RIGHT || keyCode == WXK_NUMPAD_RIGHT ||
         keyCode == WXK_END || keyCode == WXK_NUMPAD_END ||
         keyCode == WXK_PAGEDOWN || keyCode == WXK_NUMPAD_PAGEDOWN)
     {
         keyCode == WXK_END || keyCode == WXK_NUMPAD_END ||
         keyCode == WXK_PAGEDOWN || keyCode == WXK_NUMPAD_PAGEDOWN)
     {
@@ -2527,8 +2527,14 @@ void wxRichTextCtrl::OnUpdateSelectAll(wxUpdateUIEvent& event)
     event.Enable(GetLastPosition() > 0);
 }
 
     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;
     if (!m_contextMenu)
     {
         m_contextMenu = new wxMenu;