From bf6461219dad12e84f5be1806e184afd2e0d6fc1 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 9 Feb 2005 22:31:30 +0000 Subject: [PATCH] redraw the grid when it's enabled/disabled git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31881 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/generic/grid.h | 4 ++++ src/generic/grid.cpp | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/include/wx/generic/grid.h b/include/wx/generic/grid.h index c826e2b499..22096fc6e1 100644 --- a/include/wx/generic/grid.h +++ b/include/wx/generic/grid.h @@ -1561,6 +1561,10 @@ public: } + // override some base class functions + virtual bool Enable(bool enable = true); + + // ------ For compatibility with previous wxGrid only... // // ************************************************ diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index dad2139822..712326e611 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -7524,6 +7524,16 @@ void wxGrid::ForceRefresh() EndBatch(); } +bool wxGrid::Enable(bool enable) +{ + if ( !wxScrolledWindow::Enable(enable) ) + return false; + + // redraw in the new state + m_gridWin->Refresh(); + + return true; +} // // ------ Edit control functions