Ensure that wxGrid appearance always reflects its enabled state
Override DoEnable() in wxGrid instead of Enable() to ensure that the grid is shown appropriately for its current state whenever either it or its parent is disabled. Note that this also fixes the bug with only the main grid window being refreshed, but not the row/column headers, which also need to be.
This commit is contained in:
@@ -6817,15 +6817,11 @@ void wxGrid::ForceRefresh()
|
||||
EndBatch();
|
||||
}
|
||||
|
||||
bool wxGrid::Enable(bool enable)
|
||||
void wxGrid::DoEnable(bool enable)
|
||||
{
|
||||
if ( !wxScrolledWindow::Enable(enable) )
|
||||
return false;
|
||||
wxScrolledWindow::DoEnable(enable);
|
||||
|
||||
// redraw in the new state
|
||||
m_gridWin->Refresh();
|
||||
|
||||
return true;
|
||||
Refresh(false /* don't erase background */);
|
||||
}
|
||||
|
||||
//
|
||||
|
Reference in New Issue
Block a user