Version: 3.2.2
wxPropertyGridInterface Class Referenceabstract

#include <wx/propgrid/propgridiface.h>

+ Inheritance diagram for wxPropertyGridInterface:

Detailed Description

Most of the shared property manipulation interface shared by wxPropertyGrid, wxPropertyGridPage, and wxPropertyGridManager is defined in this class.

Remarks
  • In separate wxPropertyGrid component this class was known as wxPropertyContainerMethods.
  • wxPropertyGridInterface's property operation member functions all accept a special wxPGPropArg id argument, using which you can refer to properties either by their pointer (for performance) or by their name (for conveniency).

Library:  wxPropertyGrid
Category:  wxPropertyGrid

Public Types

enum  EditableStateFlags {
  SelectionState ,
  ExpandedState ,
  ScrollPosState ,
  PageState ,
  SplitterPosState ,
  DescBoxState ,
  AllStates
}
  More...
 

Public Member Functions

virtual ~wxPropertyGridInterface ()
 Destructor. More...
 
wxPGPropertyAppend (wxPGProperty *property)
 Appends property to the list. More...
 
wxPGPropertyAppendIn (wxPGPropArg id, wxPGProperty *newProperty)
 Same as Append(), but appends under given parent property. More...
 
void BeginAddChildren (wxPGPropArg id)
 In order to add new items into a property with private children (for instance, wxFlagsProperty), you need to call this method. More...
 
virtual void Clear ()=0
 Deletes all properties. More...
 
bool ClearSelection (bool validation=false)
 Clears current selection, if any. More...
 
void ClearModifiedStatus ()
 Resets modified status of all properties. More...
 
bool Collapse (wxPGPropArg id)
 Collapses given category or property with children. More...
 
bool CollapseAll ()
 Collapses all items that can be collapsed. More...
 
bool ChangePropertyValue (wxPGPropArg id, wxVariant newValue)
 Changes value of a property, as if by user. More...
 
void DeleteProperty (wxPGPropArg id)
 Removes and deletes a property and any children. More...
 
bool DisableProperty (wxPGPropArg id)
 Disables a property. More...
 
bool EditorValidate ()
 Returns true if all property grid data changes have been committed. More...
 
bool EnableProperty (wxPGPropArg id, bool enable=true)
 Enables or disables property. More...
 
void EndAddChildren (wxPGPropArg id)
 Called after population of property with fixed children has finished. More...
 
bool Expand (wxPGPropArg id)
 Expands given category or property with children. More...
 
bool ExpandAll (bool expand=true)
 Expands all items that can be expanded. More...
 
int GetColumnProportion (unsigned int column) const
 Returns auto-resize proportion of the given column. More...
 
wxPGPropertyGetFirstChild (wxPGPropArg id)
 Returns id of first child of given property. More...
 
wxPropertyGridIterator GetIterator (int flags=wxPG_ITERATE_DEFAULT, wxPGProperty *firstProp=NULL)
 Returns iterator class instance. More...
 
wxPropertyGridConstIterator GetIterator (int flags=wxPG_ITERATE_DEFAULT, wxPGProperty *firstProp=NULL) const
 
wxPropertyGridIterator GetIterator (int flags, int startPos)
 Returns iterator class instance. More...
 
wxPropertyGridConstIterator GetIterator (int flags, int startPos) const
 
wxPGPropertyGetFirst (int flags=wxPG_ITERATE_ALL)
 Returns id of first item that matches given criteria. More...
 
const wxPGPropertyGetFirst (int flags=wxPG_ITERATE_ALL) const
 
wxPGPropertyGetProperty (const wxString &name) const
 Returns pointer to a property with given name (case-sensitive). More...
 
void GetPropertiesWithFlag (wxArrayPGProperty *targetArr, wxPGProperty::FlagType flags, bool inverse=false, int iterFlags=(wxPG_ITERATE_PROPERTIES|wxPG_ITERATE_HIDDEN|wxPG_ITERATE_CATEGORIES)) const
 Adds to targetArr pointers to properties that have given flags set. More...
 
wxVariant GetPropertyAttribute (wxPGPropArg id, const wxString &attrName) const
 Returns value of given attribute. More...
 
const wxPGAttributeStorageGetPropertyAttributes (wxPGPropArg id) const
 Returns map-like storage of property's attributes. More...
 
wxColour GetPropertyBackgroundColour (wxPGPropArg id) const
 Returns background colour of first cell of a property. More...
 
wxPropertyCategoryGetPropertyCategory (wxPGPropArg id) const
 Returns pointer of property's nearest parent category. More...
 
void * GetPropertyClientData (wxPGPropArg id) const
 Returns client data (void*) of a property. More...
 
wxPGPropertyGetPropertyByLabel (const wxString &label) const
 Returns first property which label matches given string. More...
 
wxPGPropertyGetPropertyByName (const wxString &name) const
 Returns pointer to a property with given name (case-sensitive). More...
 
wxPGPropertyGetPropertyByName (const wxString &name, const wxString &subname) const
 Returns child property subname of property name. More...
 
const wxPGEditorGetPropertyEditor (wxPGPropArg id) const
 Returns property's editor. More...
 
wxString GetPropertyHelpString (wxPGPropArg id) const
 Returns help string associated with a property. More...
 
wxBitmapGetPropertyImage (wxPGPropArg id) const
 Returns property's custom value image (NULL of none). More...
 
const wxStringGetPropertyLabel (wxPGPropArg id)
 Returns label of a property. More...
 
wxString GetPropertyName (wxPGProperty *property)
 Returns property's name, by which it is globally accessible. More...
 
wxPGPropertyGetPropertyParent (wxPGPropArg id)
 Returns parent item of a property. More...
 
wxColour GetPropertyTextColour (wxPGPropArg id) const
 Returns text colour of first cell of a property. More...
 
wxValidatorGetPropertyValidator (wxPGPropArg id)
 Returns validator of a property as a reference, which you can pass to any number of SetPropertyValidator. More...
 
wxVariant GetPropertyValue (wxPGPropArg id)
 Returns property's value as wxVariant. More...
 
wxArrayInt GetPropertyValueAsArrayInt (wxPGPropArg id) const
 Return's property's value as wxArrayInt. More...
 
wxArrayString GetPropertyValueAsArrayString (wxPGPropArg id) const
 Returns property's value as wxArrayString. More...
 
bool GetPropertyValueAsBool (wxPGPropArg id) const
 Returns property's value as bool. More...
 
wxDateTime GetPropertyValueAsDateTime (wxPGPropArg id) const
 Return's property's value as wxDateTime. More...
 
double GetPropertyValueAsDouble (wxPGPropArg id) const
 Returns property's value as double-precision floating point number. More...
 
int GetPropertyValueAsInt (wxPGPropArg id) const
 Returns property's value as integer. More...
 
long GetPropertyValueAsLong (wxPGPropArg id) const
 Returns property's value as integer. More...
 
wxLongLong_t GetPropertyValueAsLongLong (wxPGPropArg id) const
 Returns property's value as native signed 64-bit integer. More...
 
wxString GetPropertyValueAsString (wxPGPropArg id) const
 Returns property's value as wxString. More...
 
unsigned long GetPropertyValueAsULong (wxPGPropArg id) const
 Returns property's value as unsigned integer. More...
 
wxULongLong_t GetPropertyValueAsULongLong (wxPGPropArg id) const
 Returns property's value as native unsigned 64-bit integer. More...
 
wxVariant GetPropertyValues (const wxString &listname=wxEmptyString, wxPGProperty *baseparent=NULL, long flags=0) const
 Returns a wxVariant list containing wxVariant versions of all property values. More...
 
const wxArrayPGProperty & GetSelectedProperties () const
 Returns list of currently selected properties. More...
 
wxPGPropertyGetSelection () const
 Returns currently selected property. More...
 
virtual wxPGVIterator GetVIterator (int flags) const
 Similar to GetIterator(), but instead returns wxPGVIterator instance, which can be useful for forward-iterating through arbitrary property containers. More...
 
bool HideProperty (wxPGPropArg id, bool hide=true, int flags=wxPG_RECURSE)
 Hides or reveals a property. More...
 
wxPGPropertyInsert (wxPGPropArg priorThis, wxPGProperty *newProperty)
 Inserts property to the property container. More...
 
wxPGPropertyInsert (wxPGPropArg parent, int index, wxPGProperty *newProperty)
 Inserts property to the property container. More...
 
bool IsPropertyCategory (wxPGPropArg id) const
 Returns true if property is a category. More...
 
bool IsPropertyEnabled (wxPGPropArg id) const
 Returns true if property is enabled. More...
 
bool IsPropertyExpanded (wxPGPropArg id) const
 Returns true if given property is expanded. More...
 
bool IsPropertyModified (wxPGPropArg id) const
 Returns true if property has been modified after value set or modify flag clear by software. More...
 
bool IsPropertySelected (wxPGPropArg id) const
 Returns true if property is selected. More...
 
bool IsPropertyShown (wxPGPropArg id) const
 Returns true if property is shown (i.e. More...
 
bool IsPropertyValueUnspecified (wxPGPropArg id) const
 Returns true if property value is set to unspecified. More...
 
void LimitPropertyEditing (wxPGPropArg id, bool limit=true)
 Disables (limit = true) or enables (limit = false) wxTextCtrl editor of a property, if it is not the sole mean to edit the value. More...
 
virtual void RefreshGrid (wxPropertyGridPageState *state=NULL)
 If state is shown in its grid, refresh it now. More...
 
wxPGPropertyRemoveProperty (wxPGPropArg id)
 Removes a property. More...
 
wxPGPropertyReplaceProperty (wxPGPropArg id, wxPGProperty *property)
 Replaces property with id with newly created one. More...
 
bool RestoreEditableState (const wxString &src, int restoreStates=AllStates)
 Restores user-editable state. More...
 
wxString SaveEditableState (int includedStates=AllStates) const
 Used to acquire user-editable state (selected property, expanded properties, scrolled position, splitter positions). More...
 
bool SetColumnProportion (unsigned int column, int proportion)
 Set proportion of an auto-stretchable column. More...
 
void SetPropertyAttribute (wxPGPropArg id, const wxString &attrName, wxVariant value, long argFlags=0)
 Sets an attribute for this property. More...
 
void SetPropertyAttributeAll (const wxString &attrName, wxVariant value)
 Sets property attribute for all applicable properties. More...
 
void SetPropertyBackgroundColour (wxPGPropArg id, const wxColour &colour, int flags=wxPG_RECURSE)
 Sets background colour of given property. More...
 
void SetPropertyCell (wxPGPropArg id, int column, const wxString &text=wxEmptyString, const wxBitmapBundle &bitmap=wxBitmapBundle(), const wxColour &fgCol=wxNullColour, const wxColour &bgCol=wxNullColour)
 Sets text, bitmap, and colours for given column's cell. More...
 
void SetPropertyClientData (wxPGPropArg id, void *clientData)
 Sets client data (void*) of a property. More...
 
void SetPropertyColoursToDefault (wxPGPropArg id, int flags=wxPG_DONT_RECURSE)
 Resets text and background colours of given property. More...
 
void SetPropertyEditor (wxPGPropArg id, const wxPGEditor *editor)
 Sets editor for a property. More...
 
void SetPropertyEditor (wxPGPropArg id, const wxString &editorName)
 Sets editor control of a property. More...
 
void SetPropertyLabel (wxPGPropArg id, const wxString &newproplabel)
 Sets label of a property. More...
 
void SetPropertyName (wxPGPropArg id, const wxString &newName)
 Sets name of a property. More...
 
void SetPropertyReadOnly (wxPGPropArg id, bool set=true, int flags=wxPG_RECURSE)
 Sets property (and, recursively, its children) to have read-only value. More...
 
void SetPropertyValueUnspecified (wxPGPropArg id)
 Sets property's value to unspecified. More...
 
void SetPropertyValues (const wxVariantList &list, wxPGPropArg defaultCategory=wxNullProperty)
 Sets property values from a list of wxVariants. More...
 
void SetPropertyValues (const wxVariant &list, wxPGPropArg defaultCategory=wxNullProperty)
 Sets property values from a list of wxVariants. More...
 
void SetPropertyHelpString (wxPGPropArg id, const wxString &helpString)
 Associates the help string with property. More...
 
void SetPropertyImage (wxPGPropArg id, wxBitmapBundle &bmp)
 Set wxBitmap taken from wxBitmapBundle in front of the value. More...
 
bool SetPropertyMaxLength (wxPGPropArg id, int maxLen)
 Sets maximum length of text in property text editor. More...
 
void SetPropertyTextColour (wxPGPropArg id, const wxColour &colour, int flags=wxPG_RECURSE)
 Sets text colour of given property. More...
 
void SetPropertyValidator (wxPGPropArg id, const wxValidator &validator)
 Sets validator of a property. More...
 
void SetPropertyValue (wxPGPropArg id, long value)
 Sets value (long integer) of a property. More...
 
void SetPropertyValue (wxPGPropArg id, int value)
 Sets value (integer) of a property. More...
 
void SetPropertyValue (wxPGPropArg id, double value)
 Sets value (floating point) of a property. More...
 
void SetPropertyValue (wxPGPropArg id, bool value)
 Sets value (bool) of a property. More...
 
void SetPropertyValue (wxPGPropArg id, const wchar_t *value)
 Sets value (wchar_t*) of a property. More...
 
void SetPropertyValue (wxPGPropArg id, const char *value)
 Sets value (char*) of a property. More...
 
void SetPropertyValue (wxPGPropArg id, const wxString &value)
 Sets value (string) of a property. More...
 
void SetPropertyValue (wxPGPropArg id, const wxArrayString &value)
 Sets value (wxArrayString) of a property. More...
 
void SetPropertyValue (wxPGPropArg id, const wxDateTime &value)
 Sets value (wxDateTime) of a property. More...
 
void SetPropertyValue (wxPGPropArg id, wxObject *value)
 Sets value (wxObject*) of a property. More...
 
void SetPropertyValue (wxPGPropArg id, wxObject &value)
 Sets value (wxObject&) of a property. More...
 
void SetPropertyValue (wxPGPropArg id, wxLongLong_t value)
 Sets value (native 64-bit int) of a property. More...
 
void SetPropertyValue (wxPGPropArg id, wxLongLong value)
 Sets value (wxLongLong) of a property. More...
 
void SetPropertyValue (wxPGPropArg id, wxULongLong_t value)
 Sets value (native 64-bit unsigned int) of a property. More...
 
void SetPropertyValue (wxPGPropArg id, wxULongLong value)
 Sets value (wxULongLong) of a property. More...
 
void SetPropertyValue (wxPGPropArg id, const wxArrayInt &value)
 Sets value (wxArrayInt&) of a property. More...
 
void SetPropertyValueString (wxPGPropArg id, const wxString &value)
 Sets value (wxString) of a property. More...
 
void SetPropertyValue (wxPGPropArg id, wxVariant value)
 Sets value (wxVariant) of a property. More...
 
void SetPropVal (wxPGPropArg id, wxVariant &value)
 Sets value (wxVariant&) of a property. More...
 
void SetValidationFailureBehavior (int vfbFlags)
 Adjusts how wxPropertyGrid behaves when invalid value is entered in a property. More...
 
void Sort (int flags=0)
 Sorts all properties recursively. More...
 
void SortChildren (wxPGPropArg id, int flags=0)
 Sorts children of a property. More...
 
wxPGPropertyGetPropertyByNameA (const wxString &name) const
 GetPropertyByName() with assertion error message. More...
 
virtual void RefreshProperty (wxPGProperty *p)=0
 

Static Public Member Functions

static void InitAllTypeHandlers ()
 Initializes all property types. More...
 
static void RegisterAdditionalEditors ()
 Initializes additional property editors (SpinCtrl etc.). More...
 
static void SetBoolChoices (const wxString &trueChoice, const wxString &falseChoice)
 Sets strings listed in the choice dropdown of a wxBoolProperty. More...
 
static wxPGEditorGetEditorByName (const wxString &editorName)
 Returns editor pointer of editor with given name. More...
 

Member Enumeration Documentation

◆ EditableStateFlags

Flags for wxPropertyGridInterface::SaveEditableState() and wxPropertyGridInterface::RestoreEditableState().

Enumerator
SelectionState 

Include selected property.

ExpandedState 

Include expanded/collapsed property information.

ScrollPosState 

Include scrolled position.

PageState 

Include selected page information.

Only applies to wxPropertyGridManager.

SplitterPosState 

Include splitter position.

Stored for each page.

DescBoxState 

Include description box size.

Only applies to wxPropertyGridManager.

AllStates 

Include all supported user editable state information.

This is usually the default value.

Constructor & Destructor Documentation

◆ ~wxPropertyGridInterface()

virtual wxPropertyGridInterface::~wxPropertyGridInterface ( )
virtual

Destructor.

Member Function Documentation

◆ Append()

wxPGProperty * wxPropertyGridInterface::Append ( wxPGProperty property)

Appends property to the list.

wxPropertyGrid assumes ownership of the object. Becomes child of most recently added category.

Remarks
  • wxPropertyGrid takes the ownership of the property pointer.
  • If appending a category with name identical to a category already in the wxPropertyGrid, then newly created category is deleted, and most recently added category (under which properties are appended) is set to the one with same name. This allows easier adding of items to same categories in multiple passes.
  • Does not automatically redraw the control, so you may need to call Refresh() when calling this function after control has been shown for the first time.
  • This functions deselects selected property, if any. Validation failure option wxPG_VFB_STAY_IN_PROPERTY is not respected, i.e. selection is cleared even if editor had invalid value.

◆ AppendIn()

wxPGProperty * wxPropertyGridInterface::AppendIn ( wxPGPropArg  id,
wxPGProperty newProperty 
)

Same as Append(), but appends under given parent property.

Parameters
idName or pointer to parent property.
newPropertyProperty to be added.

◆ BeginAddChildren()

void wxPropertyGridInterface::BeginAddChildren ( wxPGPropArg  id)

In order to add new items into a property with private children (for instance, wxFlagsProperty), you need to call this method.

After populating has been finished, you need to call EndAddChildren().

See also
EndAddChildren()

◆ ChangePropertyValue()

bool wxPropertyGridInterface::ChangePropertyValue ( wxPGPropArg  id,
wxVariant  newValue 
)

Changes value of a property, as if by user.

Use this instead of SetPropertyValue() if you need the value to run through validation process, and also send wxEVT_PG_CHANGED.

Remarks
Since this function sends wxEVT_PG_CHANGED, it should not be called from EVT_PG_CHANGED handler.
Returns
Returns true if value was successfully changed.

◆ Clear()

virtual void wxPropertyGridInterface::Clear ( )
pure virtual

Deletes all properties.

Remarks
This functions deselects selected property, if any. Validation failure option wxPG_VFB_STAY_IN_PROPERTY is not respected, i.e. selection is cleared even if editor had invalid value.

Implemented in wxPropertyGridPage, wxPropertyGridManager, and wxPropertyGrid.

◆ ClearModifiedStatus()

void wxPropertyGridInterface::ClearModifiedStatus ( )

Resets modified status of all properties.

◆ ClearSelection()

bool wxPropertyGridInterface::ClearSelection ( bool  validation = false)

Clears current selection, if any.

Parameters
validationIf set to false, deselecting the property will always work, even if its editor had invalid value in it.
Returns
Returns true if successful or if there was no selection. May fail if validation was enabled and active editor had invalid value.
Remarks
In wxWidgets 2.9 and later, this function no longer sends wxPG_EVT_SELECTED.
See also
wxPropertyGrid::SelectProperty()

◆ Collapse()

bool wxPropertyGridInterface::Collapse ( wxPGPropArg  id)

Collapses given category or property with children.

Returns
Returns true if actually collapsed.
Remarks
This function may deselect selected property, if any. Validation failure option wxPG_VFB_STAY_IN_PROPERTY is not respected, i.e. selection is cleared even if editor had invalid value.

◆ CollapseAll()

bool wxPropertyGridInterface::CollapseAll ( )

Collapses all items that can be collapsed.

Returns
Return false if failed (may fail if editor value cannot be validated).
Remarks
This functions clears selection. Validation failure option wxPG_VFB_STAY_IN_PROPERTY is not respected, i.e. selection is cleared even if editor had invalid value.

◆ DeleteProperty()

void wxPropertyGridInterface::DeleteProperty ( wxPGPropArg  id)

Removes and deletes a property and any children.

Parameters
idPointer or name of a property.
Remarks
If you delete a property in a wxPropertyGrid event handler, the actual deletion is postponed until the next idle event.

This functions deselects selected property, if any. Validation failure option wxPG_VFB_STAY_IN_PROPERTY is not respected, i.e. selection is cleared even if editor had invalid value.

◆ DisableProperty()

bool wxPropertyGridInterface::DisableProperty ( wxPGPropArg  id)

Disables a property.

Remarks
Property is refreshed with new settings.
See also
EnableProperty(), wxPGProperty::Enable()

◆ EditorValidate()

bool wxPropertyGridInterface::EditorValidate ( )

Returns true if all property grid data changes have been committed.

Usually only returns false if value in active editor has been invalidated by a wxValidator.

◆ EnableProperty()

bool wxPropertyGridInterface::EnableProperty ( wxPGPropArg  id,
bool  enable = true 
)

Enables or disables property.

Disabled property usually appears as having grey text.

Parameters
idName or pointer to a property.
enableIf false, property is disabled instead.
Remarks
Property is refreshed with new settings.
See also
wxPGProperty::Enable()

◆ EndAddChildren()

void wxPropertyGridInterface::EndAddChildren ( wxPGPropArg  id)

Called after population of property with fixed children has finished.

See also
BeginAddChildren()

◆ Expand()

bool wxPropertyGridInterface::Expand ( wxPGPropArg  id)

Expands given category or property with children.

Returns
Returns true if actually expanded.
Remarks
This function may deselect selected property, if any. Validation failure option wxPG_VFB_STAY_IN_PROPERTY is not respected, i.e. selection is cleared even if editor had invalid value.

◆ ExpandAll()

bool wxPropertyGridInterface::ExpandAll ( bool  expand = true)

Expands all items that can be expanded.

Remarks
This functions clears selection. Validation failure option wxPG_VFB_STAY_IN_PROPERTY is not respected, i.e. selection is cleared even if editor had invalid value.

◆ GetColumnProportion()

int wxPropertyGridInterface::GetColumnProportion ( unsigned int  column) const

Returns auto-resize proportion of the given column.

See also
SetColumnProportion()

◆ GetEditorByName()

static wxPGEditor * wxPropertyGridInterface::GetEditorByName ( const wxString editorName)
static

Returns editor pointer of editor with given name.

◆ GetFirst() [1/2]

wxPGProperty * wxPropertyGridInterface::GetFirst ( int  flags = wxPG_ITERATE_ALL)

Returns id of first item that matches given criteria.

Parameters
flagsSee wxPropertyGridIterator Flags.

◆ GetFirst() [2/2]

const wxPGProperty * wxPropertyGridInterface::GetFirst ( int  flags = wxPG_ITERATE_ALL) const

◆ GetFirstChild()

wxPGProperty * wxPropertyGridInterface::GetFirstChild ( wxPGPropArg  id)

Returns id of first child of given property.

Remarks
Does not return private children!

◆ GetIterator() [1/4]

wxPropertyGridIterator wxPropertyGridInterface::GetIterator ( int  flags,
int  startPos 
)

Returns iterator class instance.

Parameters
flagsSee wxPropertyGridIterator Flags. Value wxPG_ITERATE_DEFAULT causes iteration over everything except private child properties.
startPosEither wxTOP or wxBOTTOM. wxTOP will indicate that iterations start from the first property from the top, and wxBOTTOM means that the iteration will instead begin from bottommost valid item.

◆ GetIterator() [2/4]

wxPropertyGridConstIterator wxPropertyGridInterface::GetIterator ( int  flags,
int  startPos 
) const

◆ GetIterator() [3/4]

wxPropertyGridIterator wxPropertyGridInterface::GetIterator ( int  flags = wxPG_ITERATE_DEFAULT,
wxPGProperty firstProp = NULL 
)

Returns iterator class instance.

Parameters
flagsSee wxPropertyGridIterator Flags. Value wxPG_ITERATE_DEFAULT causes iteration over everything except private child properties.
firstPropProperty to start iteration from. If NULL, then first child of root is used.

◆ GetIterator() [4/4]

wxPropertyGridConstIterator wxPropertyGridInterface::GetIterator ( int  flags = wxPG_ITERATE_DEFAULT,
wxPGProperty firstProp = NULL 
) const

◆ GetPropertiesWithFlag()

void wxPropertyGridInterface::GetPropertiesWithFlag ( wxArrayPGProperty *  targetArr,
wxPGProperty::FlagType  flags,
bool  inverse = false,
int  iterFlags = (wxPG_ITERATE_PROPERTIES|wxPG_ITERATE_HIDDEN|wxPG_ITERATE_CATEGORIES) 
) const

Adds to targetArr pointers to properties that have given flags set.

However, if inverse is set to true, then only properties without given flags are stored.

Parameters
targetArrArray of pointers to properties in which found properties are stored.
flagsProperty flags to use.
inverseIf false, properties that have given flags are stored, otherwise there are stored only properties without given flags.
iterFlagsIterator flags to use. Default is everything expect private children. See wxPropertyGridIterator Flags.

◆ GetProperty()

wxPGProperty * wxPropertyGridInterface::GetProperty ( const wxString name) const

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 cannot be accessed globally by their name. Instead, use "<property>.<subproperty>" instead of "<subproperty>".

◆ GetPropertyAttribute()

wxVariant wxPropertyGridInterface::GetPropertyAttribute ( wxPGPropArg  id,
const wxString attrName 
) const

Returns value of given attribute.

If none found, returns wxNullVariant.

◆ GetPropertyAttributes()

const wxPGAttributeStorage & wxPropertyGridInterface::GetPropertyAttributes ( wxPGPropArg  id) const

Returns map-like storage of property's attributes.

Remarks
Note that if extra style wxPG_EX_WRITEONLY_BUILTIN_ATTRIBUTES is set, then builtin-attributes are not included in the storage.

◆ GetPropertyBackgroundColour()

wxColour wxPropertyGridInterface::GetPropertyBackgroundColour ( wxPGPropArg  id) const

Returns background colour of first cell of a property.

◆ GetPropertyByLabel()

wxPGProperty * wxPropertyGridInterface::GetPropertyByLabel ( const wxString label) const

Returns first property which label matches given string.

NULL if none found. Note that this operation is very slow when compared to GetPropertyByName().

◆ GetPropertyByName() [1/2]

wxPGProperty * wxPropertyGridInterface::GetPropertyByName ( const wxString name) const

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 cannot be accessed globally by their name. Instead, use "<property>.<subproperty>" instead of "<subproperty>".

◆ GetPropertyByName() [2/2]

wxPGProperty * wxPropertyGridInterface::GetPropertyByName ( const wxString name,
const wxString subname 
) const

Returns child property subname of property name.

Same as calling GetPropertyByName("name.subname"), albeit slightly faster.

◆ GetPropertyByNameA()

wxPGProperty * wxPropertyGridInterface::GetPropertyByNameA ( const wxString name) const

GetPropertyByName() with assertion error message.

◆ GetPropertyCategory()

wxPropertyCategory * wxPropertyGridInterface::GetPropertyCategory ( wxPGPropArg  id) const

Returns pointer of property's nearest parent category.

If no category found, returns NULL.

◆ GetPropertyClientData()

void * wxPropertyGridInterface::GetPropertyClientData ( wxPGPropArg  id) const

Returns client data (void*) of a property.

◆ GetPropertyEditor()

const wxPGEditor * wxPropertyGridInterface::GetPropertyEditor ( wxPGPropArg  id) const

Returns property's editor.

◆ GetPropertyHelpString()

wxString wxPropertyGridInterface::GetPropertyHelpString ( wxPGPropArg  id) const

Returns help string associated with a property.

◆ GetPropertyImage()

wxBitmap * wxPropertyGridInterface::GetPropertyImage ( wxPGPropArg  id) const

Returns property's custom value image (NULL of none).

◆ GetPropertyLabel()

const wxString & wxPropertyGridInterface::GetPropertyLabel ( wxPGPropArg  id)

Returns label of a property.

◆ GetPropertyName()

wxString wxPropertyGridInterface::GetPropertyName ( wxPGProperty property)

Returns property's name, by which it is globally accessible.

◆ GetPropertyParent()

wxPGProperty * wxPropertyGridInterface::GetPropertyParent ( wxPGPropArg  id)

Returns parent item of a property.

◆ GetPropertyTextColour()

wxColour wxPropertyGridInterface::GetPropertyTextColour ( wxPGPropArg  id) const

Returns text colour of first cell of a property.

◆ GetPropertyValidator()

wxValidator * wxPropertyGridInterface::GetPropertyValidator ( wxPGPropArg  id)

Returns validator of a property as a reference, which you can pass to any number of SetPropertyValidator.

◆ GetPropertyValue()

wxVariant wxPropertyGridInterface::GetPropertyValue ( wxPGPropArg  id)

Returns property's value as wxVariant.

If property value is unspecified, wxNullVariant is returned.

◆ GetPropertyValueAsArrayInt()

wxArrayInt wxPropertyGridInterface::GetPropertyValueAsArrayInt ( wxPGPropArg  id) const

Return's property's value as wxArrayInt.

◆ GetPropertyValueAsArrayString()

wxArrayString wxPropertyGridInterface::GetPropertyValueAsArrayString ( wxPGPropArg  id) const

Returns property's value as wxArrayString.

◆ GetPropertyValueAsBool()

bool wxPropertyGridInterface::GetPropertyValueAsBool ( wxPGPropArg  id) const

Returns property's value as bool.

◆ GetPropertyValueAsDateTime()

wxDateTime wxPropertyGridInterface::GetPropertyValueAsDateTime ( wxPGPropArg  id) const

Return's property's value as wxDateTime.

◆ GetPropertyValueAsDouble()

double wxPropertyGridInterface::GetPropertyValueAsDouble ( wxPGPropArg  id) const

Returns property's value as double-precision floating point number.

◆ GetPropertyValueAsInt()

int wxPropertyGridInterface::GetPropertyValueAsInt ( wxPGPropArg  id) const

Returns property's value as integer.

◆ GetPropertyValueAsLong()

long wxPropertyGridInterface::GetPropertyValueAsLong ( wxPGPropArg  id) const

Returns property's value as integer.

◆ GetPropertyValueAsLongLong()

wxLongLong_t wxPropertyGridInterface::GetPropertyValueAsLongLong ( wxPGPropArg  id) const

Returns property's value as native signed 64-bit integer.

◆ GetPropertyValueAsString()

wxString wxPropertyGridInterface::GetPropertyValueAsString ( wxPGPropArg  id) const

Returns property's value as wxString.

If property does not use string value type, then its value is converted using wxPGProperty::GetValueAsString().

◆ GetPropertyValueAsULong()

unsigned long wxPropertyGridInterface::GetPropertyValueAsULong ( wxPGPropArg  id) const

Returns property's value as unsigned integer.

◆ GetPropertyValueAsULongLong()

wxULongLong_t wxPropertyGridInterface::GetPropertyValueAsULongLong ( wxPGPropArg  id) const

Returns property's value as native unsigned 64-bit integer.

◆ GetPropertyValues()

wxVariant wxPropertyGridInterface::GetPropertyValues ( const wxString listname = wxEmptyString,
wxPGProperty baseparent = NULL,
long  flags = 0 
) const

Returns a wxVariant list containing wxVariant versions of all property values.

Order is not guaranteed.

Parameters
listnameName of the returned wxVariant list.
baseparentThe base property which children properties will be queried for values.
flagsUse wxPG_KEEP_STRUCTURE to retain category structure; each sub category will be its own wxVariantList of wxVariant. Use wxPG_INC_ATTRIBUTES to include property attributes as well. Each attribute will be stored as list variant named "@<propname>@attr."

◆ GetSelectedProperties()

const wxArrayPGProperty & wxPropertyGridInterface::GetSelectedProperties ( ) const

Returns list of currently selected properties.

Remarks
wxArrayPGProperty should be compatible with std::vector API.

◆ GetSelection()

wxPGProperty * wxPropertyGridInterface::GetSelection ( ) 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.

◆ GetVIterator()

virtual wxPGVIterator wxPropertyGridInterface::GetVIterator ( int  flags) const
virtual

Similar to GetIterator(), but instead returns wxPGVIterator instance, which can be useful for forward-iterating through arbitrary property containers.

Parameters
flagsSee wxPropertyGridIterator Flags.

Reimplemented in wxPropertyGridManager.

◆ HideProperty()

bool wxPropertyGridInterface::HideProperty ( wxPGPropArg  id,
bool  hide = true,
int  flags = wxPG_RECURSE 
)

Hides or reveals a property.

Parameters
idName or pointer to a property.
hideIf true, hides property, otherwise reveals it.
flagsBy default changes are applied recursively. Set this parameter wxPG_DONT_RECURSE to prevent this.

◆ InitAllTypeHandlers()

static void wxPropertyGridInterface::InitAllTypeHandlers ( )
static

Initializes all property types.

Causes references to most object files in the library, so calling this may cause significant increase in executable size when linking with static library.

◆ Insert() [1/2]

wxPGProperty * wxPropertyGridInterface::Insert ( wxPGPropArg  parent,
int  index,
wxPGProperty newProperty 
)

Inserts property to the property container.

See the other overload for more details.

Parameters
parentNew property is inserted under this category. Available only in the second variant. There are two versions of this function to allow this parameter to be either an id or name to a property.
indexIndex under category. Available only in the second variant. If index is < 0, property is appended in category.
newPropertyPointer to the inserted property. wxPropertyGrid will take ownership of this object.
Returns
Returns newProperty.

◆ Insert() [2/2]

wxPGProperty * wxPropertyGridInterface::Insert ( wxPGPropArg  priorThis,
wxPGProperty newProperty 
)

Inserts property to the property container.

Parameters
priorThisNew property is inserted just prior to this. Available only in the first variant. There are two versions of this function to allow this parameter to be either an id or name to a property.
newPropertyPointer to the inserted property. wxPropertyGrid will take ownership of this object.
Returns
Returns newProperty.
Remarks
  • wxPropertyGrid takes the ownership of the property pointer.
  • While Append may be faster way to add items, make note that when both types of data storage (categoric and non-categoric) are active, Insert becomes even more slow. This is especially true if current mode is non-categoric.
  • This functions deselects selected property, if any. Validation failure option wxPG_VFB_STAY_IN_PROPERTY is not respected, i.e. selection is cleared even if editor had invalid value.

Example of use:

// append category
wxPGProperty* my_cat_id = propertygrid->Append( new wxPropertyCategory("My Category") );
...
// insert into category - using second variant
wxPGProperty* my_item_id_1 = propertygrid->Insert( my_cat_id, 0, new wxStringProperty("My String 1") );
// insert before to first item - using first variant
wxPGProperty* my_item_id_2 = propertygrid->Insert( my_item_id, new wxStringProperty("My String 2") );
wxPGProperty is base class for all wxPropertyGrid properties and as such it is not intended to be ins...
Definition: property.h:882
wxPGProperty()
Default constructor.
Category (caption) property.
Definition: property.h:2942
Basic property with string value.
Definition: props.h:46

◆ IsPropertyCategory()

bool wxPropertyGridInterface::IsPropertyCategory ( wxPGPropArg  id) const

Returns true if property is a category.

◆ IsPropertyEnabled()

bool wxPropertyGridInterface::IsPropertyEnabled ( wxPGPropArg  id) const

Returns true if property is enabled.

◆ IsPropertyExpanded()

bool wxPropertyGridInterface::IsPropertyExpanded ( wxPGPropArg  id) const

Returns true if given property is expanded.

Naturally, always returns false for properties that cannot be expanded.

◆ IsPropertyModified()

bool wxPropertyGridInterface::IsPropertyModified ( wxPGPropArg  id) const

Returns true if property has been modified after value set or modify flag clear by software.

◆ IsPropertySelected()

bool wxPropertyGridInterface::IsPropertySelected ( wxPGPropArg  id) const

Returns true if property is selected.

◆ IsPropertyShown()

bool wxPropertyGridInterface::IsPropertyShown ( wxPGPropArg  id) const

Returns true if property is shown (i.e.

HideProperty() with true not called for it).

◆ IsPropertyValueUnspecified()

bool wxPropertyGridInterface::IsPropertyValueUnspecified ( wxPGPropArg  id) const

Returns true if property value is set to unspecified.

◆ LimitPropertyEditing()

void wxPropertyGridInterface::LimitPropertyEditing ( wxPGPropArg  id,
bool  limit = true 
)

Disables (limit = true) or enables (limit = false) wxTextCtrl editor of a property, if it is not the sole mean to edit the value.

Remarks
Property is refreshed with new settings.

◆ RefreshGrid()

virtual void wxPropertyGridInterface::RefreshGrid ( wxPropertyGridPageState state = NULL)
virtual

If state is shown in its grid, refresh it now.

◆ RefreshProperty()

virtual void wxPropertyGridInterface::RefreshProperty ( wxPGProperty p)
pure virtual
Remarks
This function reselects the property and may cause excess flicker, so to just call Refresh() on a rect of single property, call DrawItem() instead.

Implemented in wxPropertyGridPage, and wxPropertyGrid.

◆ RegisterAdditionalEditors()

static void wxPropertyGridInterface::RegisterAdditionalEditors ( )
static

Initializes additional property editors (SpinCtrl etc.).

Causes references to most object files in the library, so calling this may cause significant increase in executable size when linking with static library.

◆ RemoveProperty()

wxPGProperty * wxPropertyGridInterface::RemoveProperty ( wxPGPropArg  id)

Removes a property.

Does not delete the property object, but instead returns it.

Parameters
idPointer or name of a property.
Remarks
Removed property cannot have any children.
     Also, if you remove property in a wxPropertyGrid event
     handler, the actual removal is postponed until the next
     idle event.

◆ ReplaceProperty()

wxPGProperty * wxPropertyGridInterface::ReplaceProperty ( wxPGPropArg  id,
wxPGProperty property 
)

Replaces property with id with newly created one.

For example, this code replaces existing property named "Flags" with one that will have different set of items:

pg->ReplaceProperty("Flags",
wxFlagsProperty("Flags", wxPG_LABEL, newItems))
Represents a bit set that fits in a long integer.
Definition: props.h:493
#define wxPG_LABEL
Used to tell wxPGProperty to use label as name as well.
Definition: propgriddefs.h:13
See also
Insert()

◆ RestoreEditableState()

bool wxPropertyGridInterface::RestoreEditableState ( const wxString src,
int  restoreStates = AllStates 
)

Restores user-editable state.

See also wxPropertyGridInterface::SaveEditableState().

Parameters
srcString generated by SaveEditableState.
restoreStatesWhich parts to restore from source string. See list of editable state flags.
Returns
Returns false if there was problem reading the string.
Remarks
If some parts of state (such as scrolled or splitter position) fail to restore correctly, please make sure that you call this function after wxPropertyGrid size has been set (this may sometimes be tricky when sizers are used).

◆ SaveEditableState()

wxString wxPropertyGridInterface::SaveEditableState ( int  includedStates = AllStates) const

Used to acquire user-editable state (selected property, expanded properties, scrolled position, splitter positions).

Parameters
includedStatesWhich parts of state to include. See list of editable state flags.

◆ SetBoolChoices()

static void wxPropertyGridInterface::SetBoolChoices ( const wxString trueChoice,
const wxString falseChoice 
)
static

Sets strings listed in the choice dropdown of a wxBoolProperty.

Defaults are "True" and "False", so changing them to, say, "Yes" and "No" may be useful in some less technical applications.

◆ SetColumnProportion()

bool wxPropertyGridInterface::SetColumnProportion ( unsigned int  column,
int  proportion 
)

Set proportion of an auto-stretchable column.

wxPG_SPLITTER_AUTO_CENTER window style needs to be used to indicate that columns are auto- resizable.

Returns
Returns false on failure.
Remarks
You should call this for individual pages of wxPropertyGridManager (if used).
See also
GetColumnProportion()

◆ SetPropertyAttribute()

void wxPropertyGridInterface::SetPropertyAttribute ( wxPGPropArg  id,
const wxString attrName,
wxVariant  value,
long  argFlags = 0 
)

Sets an attribute for this property.

Parameters
idName or pointer to a property.
attrNameText identifier of attribute. See wxPropertyGrid Property Attribute Identifiers.
valueValue of attribute.
argFlagsOptional. Use wxPG_RECURSE to set the attribute to child properties recursively.
Remarks
  • Setting attribute's value to wxNullVariant will simply remove it from property's set of attributes.
  • Property is refreshed with new settings.

◆ SetPropertyAttributeAll()

void wxPropertyGridInterface::SetPropertyAttributeAll ( const wxString attrName,
wxVariant  value 
)

Sets property attribute for all applicable properties.

Be sure to use this method only after all properties have been added to the grid.

Remarks
Properties are refreshed with new settings.

◆ SetPropertyBackgroundColour()

void wxPropertyGridInterface::SetPropertyBackgroundColour ( wxPGPropArg  id,
const wxColour colour,
int  flags = wxPG_RECURSE 
)

Sets background colour of given property.

Parameters
idProperty name or pointer.
colourNew background colour.
flagsDefault 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.
Remarks
  • If category is tried to set recursively, only its children are affected.
  • Property is redrawn with new colour.

◆ SetPropertyCell()

void wxPropertyGridInterface::SetPropertyCell ( wxPGPropArg  id,
int  column,
const wxString text = wxEmptyString,
const wxBitmapBundle bitmap = wxBitmapBundle(),
const wxColour fgCol = wxNullColour,
const wxColour bgCol = wxNullColour 
)

Sets text, bitmap, and colours for given column's cell.

Remarks
  • You can set label cell by using column 0.
  • You can use wxPG_LABEL as text to use default text for column.

◆ SetPropertyClientData()

void wxPropertyGridInterface::SetPropertyClientData ( wxPGPropArg  id,
void *  clientData 
)

Sets client data (void*) of a property.

Remarks
This untyped client data has to be deleted manually.

◆ SetPropertyColoursToDefault()

void wxPropertyGridInterface::SetPropertyColoursToDefault ( wxPGPropArg  id,
int  flags = wxPG_DONT_RECURSE 
)

Resets text and background colours of given property.

Parameters
idProperty name or pointer.
flagsDefault is wxPG_DONT_RECURSE which causes colour to be reset only for the property in question (for backward compatibility).
Remarks
  • If category is tried to set recursively, only its children are affected.
  • Property is redrawn with new colours.

◆ SetPropertyEditor() [1/2]

void wxPropertyGridInterface::SetPropertyEditor ( wxPGPropArg  id,
const wxPGEditor editor 
)

Sets editor for a property.

Parameters
idProperty name or pointer to a property.
editorFor builtin editors, use wxPGEditor_X, where X is builtin editor's name (TextCtrl, Choice, etc. see wxPGEditor documentation for full list).

For custom editors, use pointer you received from wxPropertyGrid::RegisterEditorClass().

◆ SetPropertyEditor() [2/2]

void wxPropertyGridInterface::SetPropertyEditor ( wxPGPropArg  id,
const wxString editorName 
)

Sets editor control of a property.

As editor argument, use editor name string, such as "TextCtrl" or "Choice".

◆ SetPropertyHelpString()

void wxPropertyGridInterface::SetPropertyHelpString ( wxPGPropArg  id,
const wxString helpString 
)

Associates the help string with property.

Remarks
By default, text is shown either in the manager's "description" text box or in the status bar. If extra window style wxPG_EX_HELP_AS_TOOLTIPS is used, then the text will appear as a tooltip.

◆ SetPropertyImage()

void wxPropertyGridInterface::SetPropertyImage ( wxPGPropArg  id,
wxBitmapBundle bmp 
)

Set wxBitmap taken from wxBitmapBundle in front of the value.

Remarks
Bitmap will be scaled to a size returned by wxPropertyGrid::GetImageSize();

◆ SetPropertyLabel()

void wxPropertyGridInterface::SetPropertyLabel ( wxPGPropArg  id,
const wxString newproplabel 
)

Sets label of a property.

Remarks
  • Properties under same parent may have same labels. However, property names must still remain unique.

◆ SetPropertyMaxLength()

bool wxPropertyGridInterface::SetPropertyMaxLength ( wxPGPropArg  id,
int  maxLen 
)

Sets maximum length of text in property text editor.

Parameters
idProperty name or pointer.
maxLenMaximum number of characters of the text the user can enter in the text editor. If it is 0, the length is not limited and the text can be as long as it is supported by the underlying native text control widget.
Returns
Returns true if maximum length was set.
See also
wxPGProperty::SetMaxLength.

◆ SetPropertyName()

void wxPropertyGridInterface::SetPropertyName ( wxPGPropArg  id,
const wxString newName 
)

Sets name of a property.

Parameters
idName or pointer of property which name to change.
newNameNew name for property.

◆ SetPropertyReadOnly()

void wxPropertyGridInterface::SetPropertyReadOnly ( wxPGPropArg  id,
bool  set = true,
int  flags = wxPG_RECURSE 
)

Sets property (and, recursively, its children) to have read-only value.

In other words, user cannot change the value in the editor, but they can still copy it.

Parameters
idProperty name or pointer.
setUse true to enable read-only, false to disable it.
flagsBy default changes are applied recursively. Set this parameter to wxPG_DONT_RECURSE to prevent this.
Remarks
  • This is mainly for use with textctrl editor. Only some other editors fully support it.
  • Property is refreshed with new settings.

◆ SetPropertyTextColour()

void wxPropertyGridInterface::SetPropertyTextColour ( wxPGPropArg  id,
const wxColour colour,
int  flags = wxPG_RECURSE 
)

Sets text colour of given property.

Parameters
idProperty name or pointer.
colourNew text colour.
flagsDefault 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.
Remarks
  • If category is tried to set recursively, only its children are affected.
  • Property is redrawn with new colour.

◆ SetPropertyValidator()

void wxPropertyGridInterface::SetPropertyValidator ( wxPGPropArg  id,
const wxValidator validator 
)

Sets validator of a property.

◆ SetPropertyValue() [1/17]

void wxPropertyGridInterface::SetPropertyValue ( wxPGPropArg  id,
bool  value 
)

Sets value (bool) of a property.

◆ SetPropertyValue() [2/17]

void wxPropertyGridInterface::SetPropertyValue ( wxPGPropArg  id,
const char *  value 
)

Sets value (char*) of a property.

◆ SetPropertyValue() [3/17]

void wxPropertyGridInterface::SetPropertyValue ( wxPGPropArg  id,
const wchar_t *  value 
)

Sets value (wchar_t*) of a property.

◆ SetPropertyValue() [4/17]

void wxPropertyGridInterface::SetPropertyValue ( wxPGPropArg  id,
const wxArrayInt value 
)

Sets value (wxArrayInt&) of a property.

◆ SetPropertyValue() [5/17]

void wxPropertyGridInterface::SetPropertyValue ( wxPGPropArg  id,
const wxArrayString value 
)

Sets value (wxArrayString) of a property.

◆ SetPropertyValue() [6/17]

void wxPropertyGridInterface::SetPropertyValue ( wxPGPropArg  id,
const wxDateTime value 
)

Sets value (wxDateTime) of a property.

◆ SetPropertyValue() [7/17]

void wxPropertyGridInterface::SetPropertyValue ( wxPGPropArg  id,
const wxString value 
)

Sets value (string) of a property.

◆ SetPropertyValue() [8/17]

void wxPropertyGridInterface::SetPropertyValue ( wxPGPropArg  id,
double  value 
)

Sets value (floating point) of a property.

◆ SetPropertyValue() [9/17]

void wxPropertyGridInterface::SetPropertyValue ( wxPGPropArg  id,
int  value 
)

Sets value (integer) of a property.

◆ SetPropertyValue() [10/17]

void wxPropertyGridInterface::SetPropertyValue ( wxPGPropArg  id,
long  value 
)

Sets value (long integer) of a property.

◆ SetPropertyValue() [11/17]

void wxPropertyGridInterface::SetPropertyValue ( wxPGPropArg  id,
wxLongLong  value 
)

Sets value (wxLongLong) of a property.

◆ SetPropertyValue() [12/17]

void wxPropertyGridInterface::SetPropertyValue ( wxPGPropArg  id,
wxLongLong_t  value 
)

Sets value (native 64-bit int) of a property.

◆ SetPropertyValue() [13/17]

void wxPropertyGridInterface::SetPropertyValue ( wxPGPropArg  id,
wxObject value 
)

Sets value (wxObject&) of a property.

◆ SetPropertyValue() [14/17]

void wxPropertyGridInterface::SetPropertyValue ( wxPGPropArg  id,
wxObject value 
)

Sets value (wxObject*) of a property.

◆ SetPropertyValue() [15/17]

void wxPropertyGridInterface::SetPropertyValue ( wxPGPropArg  id,
wxULongLong  value 
)

Sets value (wxULongLong) of a property.

◆ SetPropertyValue() [16/17]

void wxPropertyGridInterface::SetPropertyValue ( wxPGPropArg  id,
wxULongLong_t  value 
)

Sets value (native 64-bit unsigned int) of a property.

◆ SetPropertyValue() [17/17]

void wxPropertyGridInterface::SetPropertyValue ( wxPGPropArg  id,
wxVariant  value 
)

Sets value (wxVariant) of a property.

Remarks
Use ChangePropertyValue() instead if you need to run through validation process and send property change event.

◆ SetPropertyValues() [1/2]

void wxPropertyGridInterface::SetPropertyValues ( const wxVariant list,
wxPGPropArg  defaultCategory = wxNullProperty 
)

Sets property values from a list of wxVariants.

◆ SetPropertyValues() [2/2]

void wxPropertyGridInterface::SetPropertyValues ( const wxVariantList &  list,
wxPGPropArg  defaultCategory = wxNullProperty 
)

Sets property values from a list of wxVariants.

◆ SetPropertyValueString()

void wxPropertyGridInterface::SetPropertyValueString ( wxPGPropArg  id,
const wxString value 
)

Sets value (wxString) of a property.

Remarks
This method uses wxPGProperty::SetValueFromString(), which all properties should implement. This means that there should not be a type error, and instead the string is converted to property's actual value type.

◆ SetPropertyValueUnspecified()

void wxPropertyGridInterface::SetPropertyValueUnspecified ( wxPGPropArg  id)

Sets property's value to unspecified.

If it has children (it may be category), then the same thing is done to them.

◆ SetPropVal()

void wxPropertyGridInterface::SetPropVal ( wxPGPropArg  id,
wxVariant value 
)

Sets value (wxVariant&) of a property.

Same as SetPropertyValue, but accepts reference.

◆ SetValidationFailureBehavior()

void wxPropertyGridInterface::SetValidationFailureBehavior ( int  vfbFlags)

Adjusts how wxPropertyGrid behaves when invalid value is entered in a property.

Parameters
vfbFlagsSee wxPropertyGrid Validation Failure behaviour Flags for possible values.

◆ Sort()

void wxPropertyGridInterface::Sort ( int  flags = 0)

Sorts all properties recursively.

Parameters
flagsThis can contain any of the following options: wxPG_SORT_TOP_LEVEL_ONLY: Only sort categories and their immediate children. Sorting done by wxPG_AUTO_SORT option uses this.
See also
SortChildren, wxPropertyGrid::SetSortFunction

◆ SortChildren()

void wxPropertyGridInterface::SortChildren ( wxPGPropArg  id,
int  flags = 0 
)

Sorts children of a property.

Parameters
idName or pointer to a property.
flagsThis can contain any of the following options: wxPG_RECURSE: Sorts recursively.
See also
Sort, wxPropertyGrid::SetSortFunction