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
This commit is contained in:
@@ -1028,12 +1028,16 @@ Few things to note:
|
|||||||
|
|
||||||
@subsection namescope Property Name Scope
|
@subsection namescope Property Name Scope
|
||||||
|
|
||||||
- All properties which parent is category or root have their names
|
All properties which parent is category or root can be accessed
|
||||||
globally accessible.
|
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
|
@subsection nonuniquelabels Non-unique Labels
|
||||||
root or non-aggregate property) can not be accessed globally by their name. Instead, use
|
|
||||||
"<property>.<subproperty>".
|
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
|
@subsection boolproperty wxBoolProperty
|
||||||
|
|
||||||
|
@@ -1004,9 +1004,6 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** Sets label of a property.
|
/** 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 );
|
void SetPropertyLabel( wxPGPropArg id, const wxString& newproplabel );
|
||||||
|
|
||||||
|
@@ -1165,6 +1165,12 @@ public:
|
|||||||
m_helpString = helpString;
|
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; }
|
void SetLabel( const wxString& label ) { m_label = label; }
|
||||||
|
|
||||||
inline void SetName( const wxString& newName );
|
inline void SetName( const wxString& newName );
|
||||||
|
@@ -765,9 +765,10 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** Sets label of a property.
|
/** Sets label of a property.
|
||||||
|
|
||||||
@remarks
|
@remarks
|
||||||
This is the only way to set property's name. There is not
|
- Properties under same parent may have same labels. However,
|
||||||
wxPGProperty::SetLabel() method.
|
property names must still remain unique.
|
||||||
*/
|
*/
|
||||||
void SetPropertyLabel( wxPGPropArg id, const wxString& newproplabel );
|
void SetPropertyLabel( wxPGPropArg id, const wxString& newproplabel );
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user