Use wxBG_STYLE_PAINT for wxGridWindow
This is more explicit, efficient and simpler than defining an empty wxEVT_ERASE_BACKGROUND handler, which is not needed any longer.
This commit is contained in:
@@ -419,6 +419,7 @@ public:
|
|||||||
"GridWindow"),
|
"GridWindow"),
|
||||||
m_type(type)
|
m_type(type)
|
||||||
{
|
{
|
||||||
|
SetBackgroundStyle(wxBG_STYLE_PAINT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -437,7 +438,6 @@ private:
|
|||||||
void OnKeyDown( wxKeyEvent& );
|
void OnKeyDown( wxKeyEvent& );
|
||||||
void OnKeyUp( wxKeyEvent& );
|
void OnKeyUp( wxKeyEvent& );
|
||||||
void OnChar( wxKeyEvent& );
|
void OnChar( wxKeyEvent& );
|
||||||
void OnEraseBackground( wxEraseEvent& );
|
|
||||||
void OnFocus( wxFocusEvent& );
|
void OnFocus( wxFocusEvent& );
|
||||||
|
|
||||||
wxDECLARE_EVENT_TABLE();
|
wxDECLARE_EVENT_TABLE();
|
||||||
|
@@ -1907,7 +1907,6 @@ wxBEGIN_EVENT_TABLE( wxGridWindow, wxGridSubwindow )
|
|||||||
EVT_CHAR( wxGridWindow::OnChar )
|
EVT_CHAR( wxGridWindow::OnChar )
|
||||||
EVT_SET_FOCUS( wxGridWindow::OnFocus )
|
EVT_SET_FOCUS( wxGridWindow::OnFocus )
|
||||||
EVT_KILL_FOCUS( wxGridWindow::OnFocus )
|
EVT_KILL_FOCUS( wxGridWindow::OnFocus )
|
||||||
EVT_ERASE_BACKGROUND( wxGridWindow::OnEraseBackground )
|
|
||||||
wxEND_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
void wxGridWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
|
void wxGridWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
|
||||||
@@ -2281,10 +2280,6 @@ void wxGridWindow::OnChar( wxKeyEvent& event )
|
|||||||
event.Skip();
|
event.Skip();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxGridWindow::OnEraseBackground( wxEraseEvent& WXUNUSED(event) )
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxGridWindow::OnFocus(wxFocusEvent& event)
|
void wxGridWindow::OnFocus(wxFocusEvent& event)
|
||||||
{
|
{
|
||||||
// and if we have any selection, it has to be repainted, because it
|
// and if we have any selection, it has to be repainted, because it
|
||||||
|
Reference in New Issue
Block a user