diff --git a/src/propgrid/editors.cpp b/src/propgrid/editors.cpp index 8607c44f28..cdff0592d0 100644 --- a/src/propgrid/editors.cpp +++ b/src/propgrid/editors.cpp @@ -262,7 +262,10 @@ void wxPGEditor::SetControlAppearance( wxPropertyGrid* pg, } } - wxVisualAttributes vattrs = ctrl->GetClassDefaultAttributes(); + // Do not make the mistake of calling GetClassDefaultAttributes() + // here. It is static, while GetDefaultAttributes() is virtual + // and the correct one to use. + wxVisualAttributes vattrs = ctrl->GetDefaultAttributes(); // Foreground colour const wxColour& fgCol = cell.GetFgCol();