diff --git a/include/wx/propgrid/property.h b/include/wx/propgrid/property.h index ab1439d6af..f00f174196 100644 --- a/include/wx/propgrid/property.h +++ b/include/wx/propgrid/property.h @@ -2107,7 +2107,7 @@ public: m_helpString = helpString; } - void SetLabel( const wxString& label ) { m_label = label; } + void SetLabel( const wxString& label ); void SetName( const wxString& newName ); diff --git a/src/propgrid/property.cpp b/src/propgrid/property.cpp index 72a7a51530..f53200afc5 100644 --- a/src/propgrid/property.cpp +++ b/src/propgrid/property.cpp @@ -703,6 +703,20 @@ bool wxPGProperty::IsSomeParent( wxPGProperty* candidate ) const return false; } +void wxPGProperty::SetLabel(const wxString& label) +{ + m_label = label; + // Update cell text if possible + if ( HasCell(0) ) + { + wxPGCell& cell = GetCell(0); + if ( cell.HasText() ) + { + cell.SetText(label); + } + } +} + void wxPGProperty::SetName( const wxString& newName ) { wxPropertyGrid* pg = GetGrid();