Fix visual state of enabled/disabled wxPropertyGrid

wxPropertyGrid needs to be refreshed while enabling/disabling to display
proper visual states of all wxPGProperty items.
This commit is contained in:
Artur Wieczorek
2021-03-12 21:41:40 +01:00
parent 02af9b0295
commit 2a536c359c
2 changed files with 7 additions and 0 deletions

View File

@@ -1457,6 +1457,7 @@ protected:
virtual void DoThaw() wxOVERRIDE;
virtual wxSize DoGetBestSize() const wxOVERRIDE;
virtual void DoEnable(bool enable) wxOVERRIDE;
#ifndef wxPG_ICON_WIDTH
wxBitmap *m_expandbmp, *m_collbmp;

View File

@@ -1185,6 +1185,12 @@ wxSize wxPropertyGrid::DoGetBestSize() const
return wxSize(width, lineHeight*numLines + 40);
}
void wxPropertyGrid::DoEnable(bool enable)
{
wxControl::DoEnable(enable);
Refresh(false);
}
// -----------------------------------------------------------------------
void wxPropertyGrid::OnTLPChanging( wxWindow* newTLP )