From: Jaakko Salli Date: Sun, 14 Sep 2008 13:53:21 +0000 (+0000) Subject: Updated documentation to acknowledge the fact that properties can have identical... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/258ccb95f58bd7a9f4d56db50b3f948b76911706 Updated documentation to acknowledge the fact that properties can have identical labels, and that they must have non-empty name that is unique under parent git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55604 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/docs/doxygen/overviews/propgrid.h b/docs/doxygen/overviews/propgrid.h index 0686d5845b..6875586de3 100644 --- a/docs/doxygen/overviews/propgrid.h +++ b/docs/doxygen/overviews/propgrid.h @@ -1028,12 +1028,16 @@ Few things to note: @subsection namescope Property Name Scope -- All properties which parent is category or root have their names - globally accessible. + All properties which parent is category or root can be accessed +directly by their base name (ie. name given for property in its constructor). +Other properties can be accessed via "ParentsName.BaseName" notation, +Naturally, all property names should be unique. -- Sub-properties (i.e. private child properties which have parent that is not category or - root or non-aggregate property) can not be accessed globally by their name. Instead, use - ".". +@subsection nonuniquelabels Non-unique Labels + + It is possible to have properties with identical label under same parent. +However, care must be taken to ensure that each property still has +unique (base) name. @subsection boolproperty wxBoolProperty diff --git a/include/wx/propgrid/propgridiface.h b/include/wx/propgrid/propgridiface.h index 68634c8023..ec4f278b32 100644 --- a/include/wx/propgrid/propgridiface.h +++ b/include/wx/propgrid/propgridiface.h @@ -1004,9 +1004,6 @@ public: } /** Sets label of a property. - @remarks - This is the only way to set property's name. There is not - wxPGProperty::SetLabel() method. */ void SetPropertyLabel( wxPGPropArg id, const wxString& newproplabel ); diff --git a/interface/wx/propgrid/property.h b/interface/wx/propgrid/property.h index 2f3f5fb223..65e494b41b 100644 --- a/interface/wx/propgrid/property.h +++ b/interface/wx/propgrid/property.h @@ -1165,6 +1165,12 @@ public: m_helpString = helpString; } + /** Sets property's label. + + @remarks + - Properties under same parent may have same labels. However, + property names must still remain unique. + */ void SetLabel( const wxString& label ) { m_label = label; } inline void SetName( const wxString& newName ); diff --git a/interface/wx/propgrid/propgridiface.h b/interface/wx/propgrid/propgridiface.h index 3f433ad1f9..ca75a14c98 100644 --- a/interface/wx/propgrid/propgridiface.h +++ b/interface/wx/propgrid/propgridiface.h @@ -765,9 +765,10 @@ public: } /** Sets label of a property. + @remarks - This is the only way to set property's name. There is not - wxPGProperty::SetLabel() method. + - Properties under same parent may have same labels. However, + property names must still remain unique. */ void SetPropertyLabel( wxPGPropArg id, const wxString& newproplabel );