@return Returns @true if successful or if there was no selection. May
fail if validation was enabled and active editor had invalid
value.
+
+ @remarks In wxPropertyGrid 1.4, this member function used to send
+ wxPG_EVT_SELECTED. In wxWidgets 2.9 and later, it no longer
+ does that.
+
+ @see wxPropertyGrid::SelectProperty()
*/
bool ClearSelection( bool validation = false);
wxPGProperty* GetFirst( int flags = wxPG_ITERATE_ALL );
/**
- Returns id of property with given name (case-sensitive).
+ Returns pointer to a property with given name (case-sensitive).
+ If there is no property with such name, @NULL pointer is returned.
+
+ @remarks Properties which have non-category, non-root parent
+ can not be accessed globally by their name. Instead, use
+ "<property>.<subproperty>" instead of "<subproperty>".
*/
wxPGProperty* GetProperty( const wxString& name ) const;
wxPGProperty* GetPropertyByLabel( const wxString& label ) const;
/**
- Returns property with given name. @NULL if none found.
+ Returns pointer to a property with given name (case-sensitive).
+ If there is no property with such name, @NULL pointer is returned.
+
+ @remarks Properties which have non-category, non-root parent
+ can not be accessed globally by their name. Instead, use
+ "<property>.<subproperty>" instead of "<subproperty>".
*/
wxPGProperty* GetPropertyByName( const wxString& name ) const;
wxVariant GetPropertyValues( const wxString& listname = wxEmptyString,
wxPGProperty* baseparent = NULL, long flags = 0 ) const;
- /** Returns currently selected property. */
+ /**
+ Returns list of currently selected properties.
+
+ @remarks wxArrayPGProperty should be compatible with std::vector API.
+ */
+ const wxArrayPGProperty& GetSelectedProperties() const;
+
+ /**
+ Returns currently selected property. NULL if none.
+
+ @remarks When wxPG_EX_MULTIPLE_SELECTION extra style is used, this
+ member function returns the focused property, that is the
+ one which can have active editor.
+ */
wxPGProperty* GetSelection() const;
/**
*/
bool IsPropertyModified( wxPGPropArg id ) const;
+ /**
+ Returns true if property is selected.
+ */
+ virtual bool IsPropertySelected( wxPGPropArg id ) const;
+
/**
Returns @true if property is shown (ie. HideProperty() with @true not
called for it).
@param colour
New background colour.
- @param recursively
- If True, child properties are affected recursively. Property
- categories are skipped if this flag is used.
+ @param flags
+ Default is wxPG_RECURSE which causes colour to be set recursively.
+ Omit this flag to only set colour for the property in question
+ and not any of its children.
*/
void SetPropertyBackgroundColour( wxPGPropArg id,
const wxColour& colour,
- bool recursively = true );
+ int flags = wxPG_RECURSE );
/**
Sets text, bitmap, and colours for given column's cell.
void SetPropertyValueUnspecified( wxPGPropArg id );
/**
- Sets various property values from a list of wxVariants. If property with
- name is missing from the grid, new property is created under given
- default category (or root if omitted).
+ Sets property values from a list of wxVariants.
*/
void SetPropertyValues( const wxVariantList& list,
wxPGPropArg defaultCategory = wxNullProperty );
+ /**
+ Sets property values from a list of wxVariants.
+ */
void SetPropertyValues( const wxVariant& list,
wxPGPropArg defaultCategory = wxNullProperty );
@param colour
New background colour.
- @param recursively
- If True, child properties are affected recursively. Property
- categories are skipped if this flag is used.
+ @param flags
+ Default is wxPG_RECURSE which causes colour to be set recursively.
+ Omit this flag to only set colour for the property in question
+ and not any of its children.
*/
void SetPropertyTextColour( wxPGPropArg id,
const wxColour& colour,
- bool recursively = true );
+ int flags = wxPG_RECURSE );
/**
Sets validator of a property.