diff --git a/include/wx/generic/private/grid.h b/include/wx/generic/private/grid.h index 172738df55..f2feaa77e8 100644 --- a/include/wx/generic/private/grid.h +++ b/include/wx/generic/private/grid.h @@ -419,6 +419,7 @@ public: "GridWindow"), m_type(type) { + SetBackgroundStyle(wxBG_STYLE_PAINT); } @@ -437,7 +438,6 @@ private: void OnKeyDown( wxKeyEvent& ); void OnKeyUp( wxKeyEvent& ); void OnChar( wxKeyEvent& ); - void OnEraseBackground( wxEraseEvent& ); void OnFocus( wxFocusEvent& ); wxDECLARE_EVENT_TABLE(); diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index 836d8d2ad1..bfce15da41 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -1907,7 +1907,6 @@ wxBEGIN_EVENT_TABLE( wxGridWindow, wxGridSubwindow ) EVT_CHAR( wxGridWindow::OnChar ) EVT_SET_FOCUS( wxGridWindow::OnFocus ) EVT_KILL_FOCUS( wxGridWindow::OnFocus ) - EVT_ERASE_BACKGROUND( wxGridWindow::OnEraseBackground ) wxEND_EVENT_TABLE() void wxGridWindow::OnPaint( wxPaintEvent &WXUNUSED(event) ) @@ -2281,10 +2280,6 @@ void wxGridWindow::OnChar( wxKeyEvent& event ) event.Skip(); } -void wxGridWindow::OnEraseBackground( wxEraseEvent& WXUNUSED(event) ) -{ -} - void wxGridWindow::OnFocus(wxFocusEvent& event) { // and if we have any selection, it has to be repainted, because it