.. wxPython Phoenix documentation

   This file was generated by Phoenix's sphinx generator and associated
   tools, do not edit by hand.

   Copyright: (c) 2011-2020 by Total Control Software
   License:   wxWindows License

.. include:: headings.inc



.. _wx.propgrid.PropertyGridInterface:

==========================================================================================================================================
|phoenix_title|  **wx.propgrid.PropertyGridInterface**
==========================================================================================================================================

Most of the shared property manipulation interface shared by :ref:`wx.propgrid.PropertyGrid`, :ref:`wx.propgrid.PropertyGridPage`, and :ref:`wx.propgrid.PropertyGridManager`  is defined in this class.          









.. note:: 

   

   - In separate :ref:`wx.propgrid.PropertyGrid`  component this class was known as PropertyContainerMethods. 
   - :ref:`wx.propgrid.PropertyGridInterface`'s property operation member functions all accept a special PGPropArg id argument, using which you can refer to properties either by their pointer (for performance) or by their name (for conveniency). 










|

|class_hierarchy| Class Hierarchy
=================================

.. raw:: html

   <div id="toggleBlock" onclick="return toggleVisibility(this)" class="closed" style="cursor:pointer;">
   <img id="toggleBlock-trigger" src="_static/images/closed.png"/>
   Inheritance diagram for class <strong>PropertyGridInterface</strong>:
   </div>
   <div id="toggleBlock-summary" style="display:block;"></div>
   <div id="toggleBlock-content" style="display:none;">
   <p class="graphviz">
   <center><img src="_static/images/inheritance/wx.propgrid.PropertyGridInterface_inheritance.png" alt="Inheritance diagram of PropertyGridInterface" usemap="#dummy" class="inheritance"/></center>
   <script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
   <map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.propgrid.PropertyGridInterface.html" title="wx.propgrid.PropertyGridInterface" alt="" coords="5,5,248,35"/> </map> 
   </p>
   </div>

|


|sub_classes| Known Subclasses
==============================

:ref:`wx.propgrid.PropertyGrid`, :ref:`wx.propgrid.PropertyGridManager`, :ref:`wx.propgrid.PropertyGridPage`

|


|method_summary| Methods Summary
================================

================================================================================ ================================================================================
:meth:`~wx.propgrid.PropertyGridInterface.Append`                                Appends property to the list.
:meth:`~wx.propgrid.PropertyGridInterface.AppendIn`                              Same as :meth:`~PropertyGridInterface.Append` , but appends under given parent property.
:meth:`~wx.propgrid.PropertyGridInterface.AutoFill`                              "Clears properties and re-fills to match members and values of
:meth:`~wx.propgrid.PropertyGridInterface.BeginAddChildren`                      In order to add new items into a property with private children (for instance, :ref:`wx.propgrid.FlagsProperty`), you need to call this method.
:meth:`~wx.propgrid.PropertyGridInterface.ChangePropertyValue`                   Changes value of a property, as if by user.
:meth:`~wx.propgrid.PropertyGridInterface.Clear`                                 Deletes all properties.
:meth:`~wx.propgrid.PropertyGridInterface.ClearModifiedStatus`                   Resets modified status of all properties.
:meth:`~wx.propgrid.PropertyGridInterface.ClearSelection`                        Clears current selection, if any.
:meth:`~wx.propgrid.PropertyGridInterface.Collapse`                              Collapses given category or property with children.
:meth:`~wx.propgrid.PropertyGridInterface.CollapseAll`                           Collapses all items that can be collapsed.
:meth:`~wx.propgrid.PropertyGridInterface.DeleteProperty`                        Removes and deletes a property and any children.
:meth:`~wx.propgrid.PropertyGridInterface.DisableProperty`                       Disables a property.
:meth:`~wx.propgrid.PropertyGridInterface.DoDefaultTypeMappings`                 Add built-in properties to the map.
:meth:`~wx.propgrid.PropertyGridInterface.DoDefaultValueTypeMappings`            Map pg value type ids to getter methods.
:meth:`~wx.propgrid.PropertyGridInterface.EditorValidate`                        Returns ``True`` if all property grid data changes have been committed.
:meth:`~wx.propgrid.PropertyGridInterface.EnableProperty`                        Enables or disables property.
:meth:`~wx.propgrid.PropertyGridInterface.EndAddChildren`                        Called after population of property with fixed children has finished.
:meth:`~wx.propgrid.PropertyGridInterface.Expand`                                Expands given category or property with children.
:meth:`~wx.propgrid.PropertyGridInterface.ExpandAll`                             Expands all items that can be expanded.
:meth:`~wx.propgrid.PropertyGridInterface.GetColumnProportion`                   Returns auto-resize proportion of the given column.
:meth:`~wx.propgrid.PropertyGridInterface.GetEditorByName`                       Returns editor pointer of editor with given name.
:meth:`~wx.propgrid.PropertyGridInterface.GetFirst`                              Returns id of first item that matches given criteria.
:meth:`~wx.propgrid.PropertyGridInterface.GetFirstChild`                         Returns id of first child of given property.
:meth:`~wx.propgrid.PropertyGridInterface.GetIterator`                           Returns iterator class instance.
:meth:`~wx.propgrid.PropertyGridInterface.GetPropertiesWithFlag`                 Adds to `targetArr`  pointers to properties that have given `flags`  set.
:meth:`~wx.propgrid.PropertyGridInterface.GetProperty`                           Returns pointer to a property with given name (case-sensitive).
:meth:`~wx.propgrid.PropertyGridInterface.GetPropertyAttribute`                  Returns value of given attribute.
:meth:`~wx.propgrid.PropertyGridInterface.GetPropertyAttributes`                 Returns map-like storage of property's attributes.
:meth:`~wx.propgrid.PropertyGridInterface.GetPropertyBackgroundColour`           Returns background colour of first cell of a property.
:meth:`~wx.propgrid.PropertyGridInterface.GetPropertyByLabel`                    Returns first property which label matches given string.
:meth:`~wx.propgrid.PropertyGridInterface.GetPropertyByName`                     Returns pointer to a property with given name (case-sensitive).
:meth:`~wx.propgrid.PropertyGridInterface.GetPropertyByNameA`                    :meth:`~PropertyGridInterface.GetPropertyByName`   with assertion error message.
:meth:`~wx.propgrid.PropertyGridInterface.GetPropertyCategory`                   Returns pointer of property's nearest parent category.
:meth:`~wx.propgrid.PropertyGridInterface.GetPropertyClientData`                 
:meth:`~wx.propgrid.PropertyGridInterface.GetPropertyEditor`                     Returns property's editor.
:meth:`~wx.propgrid.PropertyGridInterface.GetPropertyHelpString`                 Returns help string associated with a property.
:meth:`~wx.propgrid.PropertyGridInterface.GetPropertyImage`                      Returns property's custom value image (``None`` of none).
:meth:`~wx.propgrid.PropertyGridInterface.GetPropertyLabel`                      Returns label of a property.
:meth:`~wx.propgrid.PropertyGridInterface.GetPropertyName`                       Returns property's name, by which it is globally accessible.
:meth:`~wx.propgrid.PropertyGridInterface.GetPropertyParent`                     Returns parent item of a property.
:meth:`~wx.propgrid.PropertyGridInterface.GetPropertyTextColour`                 Returns text colour of first cell of a property.
:meth:`~wx.propgrid.PropertyGridInterface.GetPropertyValidator`                  Returns validator of a property as a reference, which you can pass to any number of SetPropertyValidator.
:meth:`~wx.propgrid.PropertyGridInterface.GetPropertyValue`                      Returns property's value as :ref:`Variant`.
:meth:`~wx.propgrid.PropertyGridInterface.GetPropertyValueAsArrayInt`            Return's property's value as ArrayInt.
:meth:`~wx.propgrid.PropertyGridInterface.GetPropertyValueAsArrayString`         Returns property's value as :ref:`ArrayString`.
:meth:`~wx.propgrid.PropertyGridInterface.GetPropertyValueAsBool`                Returns property's value as bool.
:meth:`~wx.propgrid.PropertyGridInterface.GetPropertyValueAsDateTime`            Return's property's value as :ref:`wx.DateTime`.
:meth:`~wx.propgrid.PropertyGridInterface.GetPropertyValueAsDouble`              Returns property's value as double-precision floating point number.
:meth:`~wx.propgrid.PropertyGridInterface.GetPropertyValueAsInt`                 Returns property's value as integer.
:meth:`~wx.propgrid.PropertyGridInterface.GetPropertyValueAsLong`                Returns property's value as integer.
:meth:`~wx.propgrid.PropertyGridInterface.GetPropertyValueAsLongLong`            Returns property's value as native signed 64-bit integer.
:meth:`~wx.propgrid.PropertyGridInterface.GetPropertyValueAsString`              Returns property's value as :ref:`String`.
:meth:`~wx.propgrid.PropertyGridInterface.GetPropertyValueAsULong`               Returns property's value as  integer.
:meth:`~wx.propgrid.PropertyGridInterface.GetPropertyValueAsULongLong`           Returns property's value as native  64-bit integer.
:meth:`~wx.propgrid.PropertyGridInterface.GetPropertyValues`                     Returns all property values in the grid.
:meth:`~wx.propgrid.PropertyGridInterface.GetPyIterator`                         Returns a pythonic property iterator for a single :ref:`PropertyGrid`
:meth:`~wx.propgrid.PropertyGridInterface.GetPyVIterator`                        Similar to :ref:`GetVIterator` but returns a pythonic iterator.
:meth:`~wx.propgrid.PropertyGridInterface.GetSelectedProperties`                 Returns list of currently selected properties.
:meth:`~wx.propgrid.PropertyGridInterface.GetSelection`                          Returns currently selected property.
:meth:`~wx.propgrid.PropertyGridInterface.GetVIterator`                          Similar to :meth:`~PropertyGridInterface.GetIterator` , but instead returns :ref:`wx.propgrid.PGVIterator`  instance, which can be useful for forward-iterating through arbitrary property containers.
:meth:`~wx.propgrid.PropertyGridInterface.HideProperty`                          Hides or reveals a property.
:meth:`~wx.propgrid.PropertyGridInterface.InitAllTypeHandlers`                   Initializes `all`  property types.
:meth:`~wx.propgrid.PropertyGridInterface.Insert`                                Inserts property to the property container.
:meth:`~wx.propgrid.PropertyGridInterface.IsPropertyCategory`                    Returns ``True`` if property is a category.
:meth:`~wx.propgrid.PropertyGridInterface.IsPropertyEnabled`                     Returns ``True`` if property is enabled.
:meth:`~wx.propgrid.PropertyGridInterface.IsPropertyExpanded`                    Returns ``True`` if given property is expanded.
:meth:`~wx.propgrid.PropertyGridInterface.IsPropertyModified`                    Returns ``True`` if property has been modified after value set or modify flag clear by software.
:meth:`~wx.propgrid.PropertyGridInterface.IsPropertySelected`                    Returns ``True`` if property is selected.
:meth:`~wx.propgrid.PropertyGridInterface.IsPropertyShown`                       Returns ``True`` if property is shown (i.e.
:meth:`~wx.propgrid.PropertyGridInterface.IsPropertyValueUnspecified`            Returns ``True`` if property value is set to unspecified.
:meth:`~wx.propgrid.PropertyGridInterface.LimitPropertyEditing`                  Disables (`limit`  = ``True``) or enables (`limit`  = ``False``) :ref:`wx.TextCtrl`  editor of a property, if it is not the sole mean to edit the value.
:meth:`~wx.propgrid.PropertyGridInterface.MapType`                               Registers Python type/class to property mapping.
:meth:`~wx.propgrid.PropertyGridInterface.RefreshGrid`                           If state is shown in its grid, refresh it now.
:meth:`~wx.propgrid.PropertyGridInterface.RefreshProperty`                       
:meth:`~wx.propgrid.PropertyGridInterface.RegisterAdditionalEditors`             Initializes additional property editors (SpinCtrl etc.).
:meth:`~wx.propgrid.PropertyGridInterface.RegisterEditor`                        Register a new editor, either an instance or a class.
:meth:`~wx.propgrid.PropertyGridInterface.RemoveProperty`                        Removes a property.
:meth:`~wx.propgrid.PropertyGridInterface.ReplaceProperty`                       Replaces property with id with newly created one.
:meth:`~wx.propgrid.PropertyGridInterface.RestoreEditableState`                  Restores user-editable state.
:meth:`~wx.propgrid.PropertyGridInterface.SaveEditableState`                     Used to acquire user-editable state (selected property, expanded properties, scrolled position, splitter positions).
:meth:`~wx.propgrid.PropertyGridInterface.SetBoolChoices`                        Sets strings listed in the choice dropdown of a :ref:`wx.propgrid.BoolProperty`.
:meth:`~wx.propgrid.PropertyGridInterface.SetColumnProportion`                   Set proportion of a auto-stretchable column.
:meth:`~wx.propgrid.PropertyGridInterface.SetPropVal`                            Sets value (:ref:`Variant`&) of a property.
:meth:`~wx.propgrid.PropertyGridInterface.SetPropertyAttribute`                  Sets an attribute for this property.
:meth:`~wx.propgrid.PropertyGridInterface.SetPropertyAttributeAll`               Sets property attribute for all applicable properties.
:meth:`~wx.propgrid.PropertyGridInterface.SetPropertyBackgroundColour`           Sets background colour of given property.
:meth:`~wx.propgrid.PropertyGridInterface.SetPropertyCell`                       Sets text, bitmap, and colours for given column's cell.
:meth:`~wx.propgrid.PropertyGridInterface.SetPropertyClientData`                 
:meth:`~wx.propgrid.PropertyGridInterface.SetPropertyColoursToDefault`           Resets text and background colours of given property.
:meth:`~wx.propgrid.PropertyGridInterface.SetPropertyEditor`                     Sets editor for a property.
:meth:`~wx.propgrid.PropertyGridInterface.SetPropertyHelpString`                 Associates the help string with property.
:meth:`~wx.propgrid.PropertyGridInterface.SetPropertyImage`                      Set :ref:`wx.Bitmap`  in front of the value.
:meth:`~wx.propgrid.PropertyGridInterface.SetPropertyLabel`                      Sets label of a property.
:meth:`~wx.propgrid.PropertyGridInterface.SetPropertyMaxLength`                  Sets maximum length of text in property text editor.
:meth:`~wx.propgrid.PropertyGridInterface.SetPropertyName`                       Sets name of a property.
:meth:`~wx.propgrid.PropertyGridInterface.SetPropertyReadOnly`                   Sets property (and, recursively, its children) to have read-only value.
:meth:`~wx.propgrid.PropertyGridInterface.SetPropertyTextColour`                 Sets text colour of given property.
:meth:`~wx.propgrid.PropertyGridInterface.SetPropertyValidator`                  Sets validator of a property.
:meth:`~wx.propgrid.PropertyGridInterface.SetPropertyValue`                      Sets value (floating point) of a property.
:meth:`~wx.propgrid.PropertyGridInterface.SetPropertyValueString`                Sets value (:ref:`String`) of a property.
:meth:`~wx.propgrid.PropertyGridInterface.SetPropertyValueUnspecified`           Sets property's value to unspecified.
:meth:`~wx.propgrid.PropertyGridInterface.SetPropertyValues`                     Sets property values from a dictionary.
:meth:`~wx.propgrid.PropertyGridInterface.SetValidationFailureBehavior`          Adjusts how :ref:`wx.propgrid.PropertyGrid`  behaves when invalid value is entered in a property.
:meth:`~wx.propgrid.PropertyGridInterface.Sort`                                  Sorts all properties recursively.
:meth:`~wx.propgrid.PropertyGridInterface.SortChildren`                          Sorts children of a property.
:meth:`~wx.propgrid.PropertyGridInterface._AutoFillMany`                         
:meth:`~wx.propgrid.PropertyGridInterface._AutoFillOne`                          
:meth:`~wx.propgrid.PropertyGridInterface._Items`                                This attribute is a pythonic iterator over all items in this
:meth:`~wx.propgrid.PropertyGridInterface._Properties`                           This attribute is a pythonic iterator over all properties in
================================================================================ ================================================================================


|


|property_summary| Properties Summary
=====================================

================================================================================ ================================================================================
:attr:`~wx.propgrid.PropertyGridInterface.Items`                                 See :meth:`~wx.propgrid.PropertyGridInterface._Items`
:attr:`~wx.propgrid.PropertyGridInterface.Properties`                            See :meth:`~wx.propgrid.PropertyGridInterface._Properties`
================================================================================ ================================================================================


|


|api| Class API
===============


.. class:: wx.propgrid.PropertyGridInterface(object)

   Most of the shared property manipulation interface shared by
   PropertyGrid, PropertyGridPage, and PropertyGridManager is
   defined in this class.



   .. method:: Append(self, property)

      Appends property to the list.                  

      :ref:`wx.propgrid.PropertyGrid`  assumes ownership of the object. Becomes child of most recently added category. 

                


      :param `property`: 
      :type `property`: wx.propgrid.PGProperty




      :rtype: :ref:`wx.propgrid.PGProperty`







      .. note:: 

   

         - :ref:`wx.propgrid.PropertyGrid`  takes the ownership of the property pointer. 
         - If appending a category with name identical to a category already in the :ref:`wx.propgrid.PropertyGrid`, 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 ``wx.propgrid.PG_VFB_STAY_IN_PROPERTY`` is not respected, i.e. selection is cleared even if editor had invalid value.  











   .. method:: AppendIn(self, id, newProperty)

      Same as :meth:`Append` , but appends under given parent property.                  




      :param `id`: Name or pointer to parent property.  
      :type `id`: wx.propgrid.PGPropArgCls
      :param `newProperty`: Property to be added.   
      :type `newProperty`: wx.propgrid.PGProperty








      :rtype: :ref:`wx.propgrid.PGProperty`



                  





   .. method:: AutoFill(self, obj, parent=None)

      "Clears properties and re-fills to match members and values of
      the given object or dictionary obj.



   .. method:: BeginAddChildren(self, id)

      In order to add new items into a property with private children (for instance, :ref:`wx.propgrid.FlagsProperty`), you need to call this method.                  

      After populating has been finished, you need to call :meth:`EndAddChildren` . 

                


      :param `id`: 
      :type `id`: wx.propgrid.PGPropArgCls






      .. seealso:: :meth:`EndAddChildren`     








   .. method:: ChangePropertyValue(self, id, newValue)

      Changes value of a property, as if by user.                  

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

                


      :param `id`: 
      :type `id`: wx.propgrid.PGPropArgCls
      :param `newValue`: 
      :type `newValue`: PGVariant




      :rtype: `bool`







      :returns: 

         Returns ``True`` if value was successfully changed.   







      .. note:: 

         Since this function sends  ``wxEVT_PG_CHANGED`` , it should not be called from   ``EVT_PG_CHANGED``   handler.  








   .. method:: Clear(self)

      Deletes all properties.                  

                 



      .. note:: 

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








   .. method:: ClearModifiedStatus(self)

      Resets modified status of all properties.                   





   .. method:: ClearSelection(self, validation=False)

      Clears current selection, if any.                  




      :param `validation`: If set to ``False``, deselecting the property will always work, even if its editor had invalid value in it.  
      :type `validation`: bool






      :rtype: `bool`



                  



      :returns: 

         Returns ``True`` if successful or if there was no selection. May fail if validation was enabled and active editor had invalid value.  







      .. note:: 

         In wxWidgets 2.9 and later, this function no longer sends  ``PG_EVT_SELECTED`` .  







      .. seealso:: :meth:`wx.propgrid.PropertyGrid.SelectProperty`     








   .. method:: Collapse(self, id)

      Collapses given category or property with children.                  

                


      :param `id`: 
      :type `id`: wx.propgrid.PGPropArgCls




      :rtype: `bool`







      :returns: 

         Returns ``True`` if actually collapsed.  







      .. note:: 

         This function may deselect selected property, if any. Validation failure option ``wx.propgrid.PG_VFB_STAY_IN_PROPERTY`` is not respected, i.e. selection is cleared even if editor had invalid value.   








   .. method:: CollapseAll(self)

      Collapses all items that can be collapsed.                  

                

      :rtype: `bool`







      :returns: 

         Return ``False`` if failed (may fail if editor value cannot be validated).  







      .. note:: 

         This functions clears selection. Validation failure option ``wx.propgrid.PG_VFB_STAY_IN_PROPERTY`` is not respected, i.e. selection is cleared even if editor had invalid value.   








   .. method:: DeleteProperty(self, id)

      Removes and deletes a property and any children.                  




      :param `id`: Pointer or name of a property.  
      :type `id`: wx.propgrid.PGPropArgCls





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



      .. note:: 

         If you delete a property in a :ref:`wx.propgrid.PropertyGrid`  event handler, the actual deletion is postponed until the next idle event.  








   .. method:: DisableProperty(self, id)

      Disables a property.                  

                


      :param `id`: 
      :type `id`: wx.propgrid.PGPropArgCls




      :rtype: `bool`







      .. note:: 

         Property is refreshed with new settings.  







      .. seealso:: :meth:`EnableProperty` , :meth:`wx.propgrid.PGProperty.Enable`     








   .. method:: DoDefaultTypeMappings(self)

      Add built-in properties to the map.



   .. method:: DoDefaultValueTypeMappings(self)

      Map pg value type ids to getter methods.



   .. method:: EditorValidate(self)

      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 :ref:`wx.Validator`.                  

      :rtype: `bool`








   .. method:: EnableProperty(self, id, enable=True)

      Enables or disables property.                  

      Disabled property usually appears as having grey text. 




      :param `id`: Name or pointer to a property.   
      :type `id`: wx.propgrid.PGPropArgCls
      :param `enable`: If ``False``, property is disabled instead.  
      :type `enable`: bool








      :rtype: `bool`



                  



      .. note:: 

         Property is refreshed with new settings.  







      .. seealso:: :meth:`wx.propgrid.PGProperty.Enable`     








   .. method:: EndAddChildren(self, id)

      Called after population of property with fixed children has finished.                  

                


      :param `id`: 
      :type `id`: wx.propgrid.PGPropArgCls






      .. seealso:: :meth:`BeginAddChildren`     








   .. method:: Expand(self, id)

      Expands given category or property with children.                  

                


      :param `id`: 
      :type `id`: wx.propgrid.PGPropArgCls




      :rtype: `bool`







      :returns: 

         Returns ``True`` if actually expanded.  







      .. note:: 

         This function may deselect selected property, if any. Validation failure option ``wx.propgrid.PG_VFB_STAY_IN_PROPERTY`` is not respected, i.e. selection is cleared even if editor had invalid value.   








   .. method:: ExpandAll(self, expand=True)

      Expands all items that can be expanded.                  

                


      :param `expand`: 
      :type `expand`: bool




      :rtype: `bool`







      .. note:: 

         This functions clears selection. Validation failure option ``wx.propgrid.PG_VFB_STAY_IN_PROPERTY`` is not respected, i.e. selection is cleared even if editor had invalid value.   








   .. method:: GetColumnProportion(self, column)

      Returns auto-resize proportion of the given column.                  

                


      :param `column`: 
      :type `column`: int




      :rtype: `int`







      .. seealso:: :meth:`SetColumnProportion`     








   .. staticmethod:: GetEditorByName(editorName)

      Returns editor pointer of editor with given name.                  


      :param `editorName`: 
      :type `editorName`: string




      :rtype: :ref:`wx.propgrid.PGEditor`








   .. method:: GetFirst(self, flags=PG_ITERATE_ALL)

      Returns id of first item that matches given criteria.                  




      :param `flags`: See :ref:`wx.propgrid.PG_ITERATOR_FLAGS`.   
      :type `flags`: int






      :rtype: :ref:`wx.propgrid.PGProperty`



                  





   .. method:: GetFirstChild(self, id)

      Returns id of first child of given property.                  

                


      :param `id`: 
      :type `id`: wx.propgrid.PGPropArgCls




      :rtype: :ref:`wx.propgrid.PGProperty`







      .. note:: 

         Does not return private children!   








   .. method:: GetIterator(self, *args, **kw)



      |overload| Overloaded Implementations:

      :html:`<hr class="overloadsep" /><br />`

      
      **GetIterator** `(self, flags=PG_ITERATE_DEFAULT, firstProp=None)`
      
      Returns iterator class instance.                  
      
      
      
      
      :param `flags`: See :ref:`wx.propgrid.PG_ITERATOR_FLAGS`. Value ``wx.propgrid.PG_ITERATE_DEFAULT`` causes iteration over everything except private child properties.   
      :type `flags`: int
      :param `firstProp`: Property to start iteration from. If ``None``, then first child of root is used.   
      :type `firstProp`: wx.propgrid.PGProperty
      
      
      
      
      
      
      
      
      :rtype: :ref:`wx.propgrid.PropertyGridIterator`
      
      
      
                        
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **GetIterator** `(self, flags, startPos)`
      
      Returns iterator class instance.                  
      
      
      
      
      :param `flags`: See :ref:`wx.propgrid.PG_ITERATOR_FLAGS`. Value ``wx.propgrid.PG_ITERATE_DEFAULT`` causes iteration over everything except private child properties.   
      :type `flags`: int
      :param `startPos`: Either ``wx.TOP`` or ``wx.BOTTOM``. ``wx.TOP`` will indicate that iterations start from the first property from the top, and ``wx.BOTTOM`` means that the iteration will instead begin from bottommost valid item.   
      :type `startPos`: int
      
      
      
      
      
      
      
      
      :rtype: :ref:`wx.propgrid.PropertyGridIterator`
      
      
      
                        
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`






   .. method:: GetPropertiesWithFlag(self, targetArr, flags, inverse=False, iterFlags=PG_ITERATE_PROPERTIES|PG_ITERATE_HIDDEN|PG_ITERATE_CATEGORIES)

      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. 




      :param `targetArr`: Array of pointers to properties in which found properties are stored.   
      :type `targetArr`: ArrayPGProperty
      :param `flags`: Property flags to use.   
      :type `flags`: PGProperty.FlagType
      :param `inverse`: If ``False``, properties that have given flags are stored, otherwise there are stored only properties without given flags.   
      :type `inverse`: bool
      :param `iterFlags`: Iterator flags to use. Default is everything expect private children. See :ref:`wx.propgrid.PG_ITERATOR_FLAGS`.   
      :type `iterFlags`: int










                  





   .. method:: GetProperty(self, name)

      Returns pointer to a property with given name (case-sensitive).                  

      If there is no property with such name, ``None`` pointer is returned. 

                


      :param `name`: 
      :type `name`: string




      :rtype: :ref:`wx.propgrid.PGProperty`







      .. note:: 

         Properties which have non-category, non-root parent cannot be accessed globally by their name. Instead, use "<property>.<subproperty>" instead of "<subproperty>".   








   .. method:: GetPropertyAttribute(self, id, attrName)

      Returns value of given attribute.                  

      If none found, returns NullVariant.                  


      :param `id`: 
      :type `id`: wx.propgrid.PGPropArgCls
      :param `attrName`: 
      :type `attrName`: string




      :rtype: :ref:`PGVariant`








   .. method:: GetPropertyAttributes(self, id)

      Returns map-like storage of property's attributes.                  

                


      :param `id`: 
      :type `id`: wx.propgrid.PGPropArgCls




      :rtype: :ref:`wx.propgrid.PGAttributeStorage`







      .. note:: 

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








   .. method:: GetPropertyBackgroundColour(self, id)

      Returns background colour of first cell of a property.                  


      :param `id`: 
      :type `id`: wx.propgrid.PGPropArgCls




      :rtype: :ref:`Colour`








   .. method:: GetPropertyByLabel(self, label)

      Returns first property which label matches given string.                  

      ``None`` if none found. Note that this operation is very slow when compared to :meth:`GetPropertyByName` .                  


      :param `label`: 
      :type `label`: string




      :rtype: :ref:`wx.propgrid.PGProperty`








   .. method:: GetPropertyByName(self, *args, **kw)



      |overload| Overloaded Implementations:

      :html:`<hr class="overloadsep" /><br />`

      
      **GetPropertyByName** `(self, name)`
      
      Returns pointer to a property with given name (case-sensitive).                  
      
      If there is no property with such name, ``None`` pointer is returned. 
      
                      
      
      
      :param `name`: 
      :type `name`: string
      
      
      
      
      :rtype: :ref:`wx.propgrid.PGProperty`
      
      
      
      
      
      
      
      .. note:: 
      
         Properties which have non-category, non-root parent cannot be accessed globally by their name. Instead, use "<property>.<subproperty>" instead of "<subproperty>".   
      
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **GetPropertyByName** `(self, name, subname)`
      
      Returns child property `subname`  of property `name`.                  
      
      Same as calling GetPropertyByName("name.subname"), albeit slightly faster.                  
      
      
      :param `name`: 
      :type `name`: string
      :param `subname`: 
      :type `subname`: string
      
      
      
      
      :rtype: :ref:`wx.propgrid.PGProperty`
      
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`






   .. method:: GetPropertyByNameA(self, name)

      :meth:`GetPropertyByName`   with assertion error message.                  


      :param `name`: 
      :type `name`: string




      :rtype: :ref:`wx.propgrid.PGProperty`








   .. method:: GetPropertyCategory(self, id)

      Returns pointer of property's nearest parent category.                  

      If no category found, returns ``None``.                  


      :param `id`: 
      :type `id`: wx.propgrid.PGPropArgCls




      :rtype: :ref:`wx.propgrid.PropertyCategory`








   .. method:: GetPropertyClientData(self, p)




   .. method:: GetPropertyEditor(self, id)

      Returns property's editor.                  


      :param `id`: 
      :type `id`: wx.propgrid.PGPropArgCls




      :rtype: :ref:`wx.propgrid.PGEditor`








   .. method:: GetPropertyHelpString(self, id)

      Returns help string associated with a property.                  


      :param `id`: 
      :type `id`: wx.propgrid.PGPropArgCls




      :rtype: `string`








   .. method:: GetPropertyImage(self, id)

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


      :param `id`: 
      :type `id`: wx.propgrid.PGPropArgCls




      :rtype: :ref:`Bitmap`








   .. method:: GetPropertyLabel(self, id)

      Returns label of a property.                  


      :param `id`: 
      :type `id`: wx.propgrid.PGPropArgCls




      :rtype: `string`








   .. method:: GetPropertyName(self, property)

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


      :param `property`: 
      :type `property`: wx.propgrid.PGProperty




      :rtype: `string`








   .. method:: GetPropertyParent(self, id)

      Returns parent item of a property.                  


      :param `id`: 
      :type `id`: wx.propgrid.PGPropArgCls




      :rtype: :ref:`wx.propgrid.PGProperty`








   .. method:: GetPropertyTextColour(self, id)

      Returns text colour of first cell of a property.                  


      :param `id`: 
      :type `id`: wx.propgrid.PGPropArgCls




      :rtype: :ref:`Colour`








   .. method:: GetPropertyValidator(self, id)

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


      :param `id`: 
      :type `id`: wx.propgrid.PGPropArgCls




      :rtype: :ref:`Validator`








   .. method:: GetPropertyValue(self, id)

      Returns property's value as :ref:`Variant`.                  

      If property value is unspecified, NullVariant is returned.                  


      :param `id`: 
      :type `id`: wx.propgrid.PGPropArgCls




      :rtype: :ref:`PGVariant`








   .. method:: GetPropertyValueAsArrayInt(self, id)

      Return's property's value as ArrayInt.                  


      :param `id`: 
      :type `id`: wx.propgrid.PGPropArgCls




      :rtype: `list of integers`








   .. method:: GetPropertyValueAsArrayString(self, id)

      Returns property's value as :ref:`ArrayString`.                  


      :param `id`: 
      :type `id`: wx.propgrid.PGPropArgCls




      :rtype: `list of strings`








   .. method:: GetPropertyValueAsBool(self, id)

      Returns property's value as bool.                  


      :param `id`: 
      :type `id`: wx.propgrid.PGPropArgCls




      :rtype: `bool`








   .. method:: GetPropertyValueAsDateTime(self, id)

      Return's property's value as :ref:`wx.DateTime`.                  


      :param `id`: 
      :type `id`: wx.propgrid.PGPropArgCls




      :rtype: :ref:`DateTime`








   .. method:: GetPropertyValueAsDouble(self, id)

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


      :param `id`: 
      :type `id`: wx.propgrid.PGPropArgCls




      :rtype: `float`








   .. method:: GetPropertyValueAsInt(self, id)

      Returns property's value as integer.                  


      :param `id`: 
      :type `id`: wx.propgrid.PGPropArgCls




      :rtype: `int`








   .. method:: GetPropertyValueAsLong(self, id)

      Returns property's value as integer.                  


      :param `id`: 
      :type `id`: wx.propgrid.PGPropArgCls




      :rtype: `long`








   .. method:: GetPropertyValueAsLongLong(self, id)

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


      :param `id`: 
      :type `id`: wx.propgrid.PGPropArgCls




      :rtype: :ref:`LongLong_t`








   .. method:: GetPropertyValueAsString(self, id)

      Returns property's value as :ref:`String`.                  

      If property does not use string value type, then its value is converted using :meth:`wx.propgrid.PGProperty.GetValueAsString` .                  


      :param `id`: 
      :type `id`: wx.propgrid.PGPropArgCls




      :rtype: `string`








   .. method:: GetPropertyValueAsULong(self, id)

      Returns property's value as  integer.                  


      :param `id`: 
      :type `id`: wx.propgrid.PGPropArgCls




      :rtype: `int`








   .. method:: GetPropertyValueAsULongLong(self, id)

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


      :param `id`: 
      :type `id`: wx.propgrid.PGPropArgCls




      :rtype: :ref:`ULongLong_t`








   .. method:: GetPropertyValues(self, dict_=None, as_strings=False, inc_attributes=False, flags=PG_ITERATE_PROPERTIES)

      Returns all property values in the grid.
      
      :param `dict_`: A diftionary to fill with the property values.
        If not given, then a new one is created. The dict_ can be an
        object as well, in which case it's __dict__ is used.
      :param `as_strings`: if True, then string representations of values
        are fetched instead of native types. Useful for config and such.
      :param `inc_attributes`: if True, then property attributes are added
        in the form of ``"@<propname>@<attr>"``.
      :param `flags`: Flags to pass to the iterator. See :ref:`wx.propgrid.PG_ITERATOR_FLAGS`.
      :returns: A dictionary with values. It is always a dictionary,
        so if dict_ was an object with __dict__ attribute, then that
        attribute is returned.



   .. method:: GetPyIterator(self, flags=PG_ITERATE_DEFAULT, firstProperty=None)

      Returns a pythonic property iterator for a single :ref:`PropertyGrid`
      or page in :ref:`PropertyGridManager`. Arguments are same as for
      :ref:`GetIterator`.
      
      The following example demonstrates iterating absolutely all items in
      a single grid::
      
        iterator = propGrid.GetPyIterator(wx.propgrid.PG_ITERATE_ALL)
        for prop in iterator:
                print(prop)
      
      .. seealso:: `wx.propgrid.PropertyGridInterface.Properties`
            `wx.propgrid.PropertyGridInterface.Items`



   .. method:: GetPyVIterator(self, flags=PG_ITERATE_DEFAULT)

      Similar to :ref:`GetVIterator` but returns a pythonic iterator.



   .. method:: GetSelectedProperties(self)

      Returns list of currently selected properties.                  

                

      :rtype: :ref:`ArrayPGProperty`







      .. note:: 

         ArrayPGProperty should be compatible with `std.vector` API.   








   .. method:: GetSelection(self)

      Returns currently selected property.                  

      ``None`` if none. 

                

      :rtype: :ref:`wx.propgrid.PGProperty`







      .. note:: 

         When ``wx.propgrid.PG_EX_MULTIPLE_SELECTION`` extra style is used, this member function returns the focused property, that is the one which can have active editor.   








   .. method:: GetVIterator(self, flags)

      Similar to :meth:`GetIterator` , but instead returns :ref:`wx.propgrid.PGVIterator`  instance, which can be useful for forward-iterating through arbitrary property containers.                  




      :param `flags`: See :ref:`wx.propgrid.PG_ITERATOR_FLAGS`.   
      :type `flags`: int






      :rtype: :ref:`wx.propgrid.PGVIterator`



                  





   .. method:: HideProperty(self, id, hide=True, flags=PG_RECURSE)

      Hides or reveals a property.                  




      :param `id`: Name or pointer to a property.   
      :type `id`: wx.propgrid.PGPropArgCls
      :param `hide`: If ``True``, hides property, otherwise reveals it.   
      :type `hide`: bool
      :param `flags`: By default changes are applied recursively. Set this parameter ``wx.propgrid.PG_DONT_RECURSE`` to prevent this.   
      :type `flags`: int










      :rtype: `bool`



                  





   .. staticmethod:: InitAllTypeHandlers()

      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.                   





   .. method:: Insert(self, *args, **kw)



      |overload| Overloaded Implementations:

      :html:`<hr class="overloadsep" /><br />`

      
      **Insert** `(self, priorThis, newProperty)`
      
      Inserts property to the property container.                  
      
      
      
      
      :param `priorThis`: New 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.   
      :type `priorThis`: wx.propgrid.PGPropArgCls
      :param `newProperty`: Pointer to the inserted property. :ref:`wx.propgrid.PropertyGrid`  will take ownership of this object.  
      :type `newProperty`: wx.propgrid.PGProperty
      
      
      
      
      
      
      
      
      :rtype: :ref:`wx.propgrid.PGProperty`
      
      
      
      
      
      - :ref:`wx.propgrid.PropertyGrid`  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 ``wx.propgrid.PG_VFB_STAY_IN_PROPERTY`` is not respected, i.e. selection is cleared even if editor had invalid value. 
      
      
      
      
      Example of use: 
      
      ::
      
          # append category
          my_cat_id = thePropGrid.Append(wx.propgrid.PropertyCategory("My Category"))
      
          ...
      
          # insert into category - using second variant
          my_item_id1 = thePropGrid.Insert(my_cat_id, 0, wx.propgrid.StringProperty("My String 1"))
      
          # insert before to first item - using first variant
          my_item_id2 = thePropGrid.Insert(my_item_id, wx.propgrid.StringProperty("My String 2"))
      
                        
      
      
      
      :returns: 
      
         Returns newProperty.  
      
      
      
      
      
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **Insert** `(self, parent, index, newProperty)`
      
      Inserts property to the property container.                  
      
      See the other overload for more details. 
      
      
      
      
      :param `parent`: New 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.   
      :type `parent`: wx.propgrid.PGPropArgCls
      :param `index`: Index under category. Available only in the second variant. If index is < 0, property is appended in category.   
      :type `index`: int
      :param `newProperty`: Pointer to the inserted property. :ref:`wx.propgrid.PropertyGrid`  will take ownership of this object.  
      :type `newProperty`: wx.propgrid.PGProperty
      
      
      
      
      
      
      
      
      
      
      :rtype: :ref:`wx.propgrid.PGProperty`
      
      
      
                        
      
      
      
      :returns: 
      
         Returns newProperty.   
      
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`






   .. method:: IsPropertyCategory(self, id)

      Returns ``True`` if property is a category.                  


      :param `id`: 
      :type `id`: wx.propgrid.PGPropArgCls




      :rtype: `bool`








   .. method:: IsPropertyEnabled(self, id)

      Returns ``True`` if property is enabled.                  


      :param `id`: 
      :type `id`: wx.propgrid.PGPropArgCls




      :rtype: `bool`








   .. method:: IsPropertyExpanded(self, id)

      Returns ``True`` if given property is expanded.                  

      Naturally, always returns ``False`` for properties that cannot be expanded.                  


      :param `id`: 
      :type `id`: wx.propgrid.PGPropArgCls




      :rtype: `bool`








   .. method:: IsPropertyModified(self, id)

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


      :param `id`: 
      :type `id`: wx.propgrid.PGPropArgCls




      :rtype: `bool`








   .. method:: IsPropertySelected(self, id)

      Returns ``True`` if property is selected.                  


      :param `id`: 
      :type `id`: wx.propgrid.PGPropArgCls




      :rtype: `bool`








   .. method:: IsPropertyShown(self, id)

      Returns ``True`` if property is shown (i.e.                  

      :meth:`HideProperty`   with ``True`` not called for it).                  


      :param `id`: 
      :type `id`: wx.propgrid.PGPropArgCls




      :rtype: `bool`








   .. method:: IsPropertyValueUnspecified(self, id)

      Returns ``True`` if property value is set to unspecified.                  


      :param `id`: 
      :type `id`: wx.propgrid.PGPropArgCls




      :rtype: `bool`








   .. method:: LimitPropertyEditing(self, id, limit=True)

      Disables (`limit`  = ``True``) or enables (`limit`  = ``False``) :ref:`wx.TextCtrl`  editor of a property, if it is not the sole mean to edit the value.                  

                


      :param `id`: 
      :type `id`: wx.propgrid.PGPropArgCls
      :param `limit`: 
      :type `limit`: bool






      .. note:: 

         Property is refreshed with new settings.   








   .. method:: MapType(self, class_, factory)

      Registers Python type/class to property mapping.
      
      :param `factory`: Property builder function/class.



   .. method:: RefreshGrid(self, state=None)

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


      :param `state`: 
      :type `state`: wx.propgrid.PropertyGridPageState







   .. method:: RefreshProperty(self, p)



                


      :param `p`: 
      :type `p`: wx.propgrid.PGProperty






      .. note:: 

         This function reselects the property and may cause excess flicker, so to just call Refresh() on a rect of single property, call DrawItem() instead.   








   .. staticmethod:: RegisterAdditionalEditors()

      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.                   





   .. method:: RegisterEditor(self, editor, editorName=None)

      Register a new editor, either an instance or a class.



   .. method:: RemoveProperty(self, id)

      Removes a property.                  

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




      :param `id`: Pointer or name of a property.  
      :type `id`: wx.propgrid.PGPropArgCls






      :rtype: :ref:`wx.propgrid.PGProperty`



                  



      .. note:: 

         Removed property cannot have any children.   








   .. method:: ReplaceProperty(self, id, 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",
              wx.propgrid.FlagsProperty("Flags", wx.propgrid.PG_LABEL, newItems))



                


      :param `id`: 
      :type `id`: wx.propgrid.PGPropArgCls
      :param `property`: 
      :type `property`: wx.propgrid.PGProperty




      :rtype: :ref:`wx.propgrid.PGProperty`







      .. seealso:: :meth:`Insert`     








   .. method:: RestoreEditableState(self, src, restoreStates=AllStates)

      Restores user-editable state.                  

      See also :meth:`wx.propgrid.PropertyGridInterface.SaveEditableState` . 




      :param `src`: String generated by SaveEditableState.  
      :type `src`: string
      :param `restoreStates`: Which parts to restore from source string. See :ref:`list of editable state flags <wx.propgrid.PropertyGridInterface>`.  
      :type `restoreStates`: int








      :rtype: `bool`



                  



      :returns: 

         Returns ``False`` if there was problem reading the string.  







      .. note:: 

         If some parts of state (such as scrolled or splitter position) fail to restore correctly, please make sure that you call this function after :ref:`wx.propgrid.PropertyGrid`  size has been set (this may sometimes be tricky when sizers are used).   








   .. method:: SaveEditableState(self, includedStates=AllStates)

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




      :param `includedStates`: Which parts of state to include. See :ref:`list of editable state flags <wx.propgrid.PropertyGridInterface>`.   
      :type `includedStates`: int






      :rtype: `string`



                  





   .. staticmethod:: SetBoolChoices(trueChoice, falseChoice)

      Sets strings listed in the choice dropdown of a :ref:`wx.propgrid.BoolProperty`.                  

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


      :param `trueChoice`: 
      :type `trueChoice`: string
      :param `falseChoice`: 
      :type `falseChoice`: string







   .. method:: SetColumnProportion(self, column, proportion)

      Set proportion of a auto-stretchable column.                  

      ``wx.propgrid.PG_SPLITTER_AUTO_CENTER`` window style needs to be used to indicate that columns are auto- resizable. 

                


      :param `column`: 
      :type `column`: int
      :param `proportion`: 
      :type `proportion`: int




      :rtype: `bool`







      :returns: 

         Returns ``False`` on failure.  







      .. note:: 

         You should call this for individual pages of :ref:`wx.propgrid.PropertyGridManager`  (if used).  







      .. seealso:: :meth:`GetColumnProportion`     








   .. method:: SetPropVal(self, id, value)

      Sets value (:ref:`Variant`&) of a property.                  

      Same as SetPropertyValue, but accepts reference.                  


      :param `id`: 
      :type `id`: wx.propgrid.PGPropArgCls
      :param `value`: 
      :type `value`: PGVariant







   .. method:: SetPropertyAttribute(self, id, attrName, value, argFlags=0)

      Sets an attribute for this property.                  




      :param `id`: Name or pointer to a property.   
      :type `id`: wx.propgrid.PGPropArgCls
      :param `attrName`: Text identifier of attribute. See :ref:`PropertyGrid Property Attribute Identifiers <propertygrid property attribute identifiers>`.   
      :type `attrName`: string
      :param `value`: Value of attribute.   
      :type `value`: PGVariant
      :param `argFlags`: Optional. Use ``wx.propgrid.PG_RECURSE`` to set the attribute to child properties recursively.  
      :type `argFlags`: long










                  



      .. note:: 

   

         - Setting attribute's value to NullVariant will simply remove it from property's set of attributes. 
         - Property is refreshed with new settings.  











   .. method:: SetPropertyAttributeAll(self, attrName, value)

      Sets property attribute for all applicable properties.                  

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

                


      :param `attrName`: 
      :type `attrName`: string
      :param `value`: 
      :type `value`: PGVariant






      .. note:: 

         Properties are refreshed with new settings.   








   .. method:: SetPropertyBackgroundColour(self, id, colour, flags=PG_RECURSE)

      Sets background colour of given property.                  




      :param `id`: Property name or pointer.  
      :type `id`: wx.propgrid.PGPropArgCls
      :param `colour`: New background colour.  
      :type `colour`: wx.Colour
      :param `flags`: Default is ``wx.propgrid.PG_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.  
      :type `flags`: int








                  



      .. note:: 

   

         - If category is tried to set recursively, only its children are affected. 
         - Property is redrawn with new colour.  











   .. method:: SetPropertyCell(self, id, column, text=EmptyString, bitmap=NullBitmap, fgCol=NullColour, bgCol=NullColour)

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

                


      :param `id`: 
      :type `id`: wx.propgrid.PGPropArgCls
      :param `column`: 
      :type `column`: int
      :param `text`: 
      :type `text`: string
      :param `bitmap`: 
      :type `bitmap`: wx.Bitmap
      :param `fgCol`: 
      :type `fgCol`: wx.Colour
      :param `bgCol`: 
      :type `bgCol`: wx.Colour






      .. note:: 

   

         - You can set label cell by using column 0. 
         - You can use ``wx.propgrid.PG_LABEL`` as text to use default text for column.  











   .. method:: SetPropertyClientData(self, p, data)




   .. method:: SetPropertyColoursToDefault(self, id, flags=PG_DONT_RECURSE)

      Resets text and background colours of given property.                  




      :param `id`: Property name or pointer.  
      :type `id`: wx.propgrid.PGPropArgCls
      :param `flags`: Default is ``wx.propgrid.PG_DONT_RECURSE`` which causes colour to be reset only for the property in question (for backward compatibility).  
      :type `flags`: int






                  



      .. note:: 

   

         - If category is tried to set recursively, only its children are affected. 
         - Property is redrawn with new colours.  











   .. method:: SetPropertyEditor(self, *args, **kw)



      |overload| Overloaded Implementations:

      :html:`<hr class="overloadsep" /><br />`

      
      **SetPropertyEditor** `(self, id, editor)`
      
      Sets editor for a property.                  
      
      
      
      
      :param `id`: Property name or pointer to a property.   
      :type `id`: wx.propgrid.PGPropArgCls
      :param `editor`: For builtin editors, use PGEditor_X, where X is builtin editor's name (TextCtrl, Choice, etc. see :ref:`wx.propgrid.PGEditor`  documentation for full list).  
      :type `editor`: wx.propgrid.PGEditor
      
      
      
      
      
      
      :meth:`wx.propgrid.PropertyGrid.RegisterEditorClass` .                   
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **SetPropertyEditor** `(self, id, editorName)`
      
      Sets editor control of a property.                  
      
      As editor argument, use editor name string, such as "TextCtrl" or "Choice".                  
      
      
      :param `id`: 
      :type `id`: wx.propgrid.PGPropArgCls
      :param `editorName`: 
      :type `editorName`: string
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`






   .. method:: SetPropertyHelpString(self, id, helpString)

      Associates the help string with property.                  

                


      :param `id`: 
      :type `id`: wx.propgrid.PGPropArgCls
      :param `helpString`: 
      :type `helpString`: string






      .. note:: 

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








   .. method:: SetPropertyImage(self, id, bmp)

      Set :ref:`wx.Bitmap`  in front of the value.                  

                


      :param `id`: 
      :type `id`: wx.propgrid.PGPropArgCls
      :param `bmp`: 
      :type `bmp`: wx.Bitmap






      .. note:: 

         Bitmap will be scaled to a size returned by :meth:`wx.propgrid.PropertyGrid.GetImageSize` ;   








   .. method:: SetPropertyLabel(self, id, newproplabel)

      Sets label of a property.                  

                


      :param `id`: 
      :type `id`: wx.propgrid.PGPropArgCls
      :param `newproplabel`: 
      :type `newproplabel`: string






      .. note:: 

   

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











   .. method:: SetPropertyMaxLength(self, id, maxLen)

      Sets maximum length of text in property text editor.                  




      :param `id`: Property name or pointer.   
      :type `id`: wx.propgrid.PGPropArgCls
      :param `maxLen`: Maximum 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 the underlying native text control widget.   
      :type `maxLen`: int








      :rtype: `bool`



                  



      :returns: 

         Returns ``True`` if maximum length was set.   







      .. seealso:: :meth:`wx.propgrid.PGProperty.SetMaxLength` .   








   .. method:: SetPropertyName(self, id, newName)

      Sets name of a property.                  




      :param `id`: Name or pointer of property which name to change.  
      :type `id`: wx.propgrid.PGPropArgCls
      :param `newName`: New name for property.   
      :type `newName`: string






                  





   .. method:: SetPropertyReadOnly(self, id, set=True, flags=PG_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. 




      :param `id`: Property name or pointer.  
      :type `id`: wx.propgrid.PGPropArgCls
      :param `set`: Use ``True`` to enable read-only, ``False`` to disable it.  
      :type `set`: bool
      :param `flags`: By default changes are applied recursively. Set this parameter to ``wx.propgrid.PG_DONT_RECURSE`` to prevent this.  
      :type `flags`: int








                  



      .. note:: 

   

         - This is mainly for use with textctrl editor. Only some other editors fully support it. 
         - Property is refreshed with new settings.  











   .. method:: SetPropertyTextColour(self, id, colour, flags=PG_RECURSE)

      Sets text colour of given property.                  




      :param `id`: Property name or pointer.  
      :type `id`: wx.propgrid.PGPropArgCls
      :param `colour`: New text colour.  
      :type `colour`: wx.Colour
      :param `flags`: Default is ``wx.propgrid.PG_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.  
      :type `flags`: int








                  



      .. note:: 

   

         - If category is tried to set recursively, only its children are affected. 
         - Property is redrawn with new colour.  











   .. method:: SetPropertyValidator(self, id, validator)

      Sets validator of a property.                  


      :param `id`: 
      :type `id`: wx.propgrid.PGPropArgCls
      :param `validator`: 
      :type `validator`: wx.Validator







   .. method:: SetPropertyValue(self, *args, **kw)



      |overload| Overloaded Implementations:

      :html:`<hr class="overloadsep" /><br />`

      
      **SetPropertyValue** `(self, id, value)`
      
      Sets value (floating point) of a property.                  
      
      
      :param `id`: 
      :type `id`: wx.propgrid.PGPropArgCls
      :param `value`: 
      :type `value`: float
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **SetPropertyValue** `(self, id, value)`
      
      Sets value (bool) of a property.                  
      
      
      :param `id`: 
      :type `id`: wx.propgrid.PGPropArgCls
      :param `value`: 
      :type `value`: bool
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **SetPropertyValue** `(self, id, value)`
      
      Sets value (string) of a property.                  
      
      
      :param `id`: 
      :type `id`: wx.propgrid.PGPropArgCls
      :param `value`: 
      :type `value`: string
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **SetPropertyValue** `(self, id, value)`
      
      Sets value (:ref:`ArrayString`) of a property.                  
      
      
      :param `id`: 
      :type `id`: wx.propgrid.PGPropArgCls
      :param `value`: 
      :type `value`: list of strings
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **SetPropertyValue** `(self, id, value)`
      
      Sets value (:ref:`wx.DateTime`) of a property.                  
      
      
      :param `id`: 
      :type `id`: wx.propgrid.PGPropArgCls
      :param `value`: 
      :type `value`: wx.DateTime
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **SetPropertyValue** `(self, id, value)`
      
      Sets value (:ref:`wx.Object`&) of a property.                  
      
      
      :param `id`: 
      :type `id`: wx.propgrid.PGPropArgCls
      :param `value`: 
      :type `value`: wx.Object
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **SetPropertyValue** `(self, id, value)`
      
      Sets value (wxArrayInt&) of a property.                  
      
      
      :param `id`: 
      :type `id`: wx.propgrid.PGPropArgCls
      :param `value`: 
      :type `value`: list of integers
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **SetPropertyValue** `(self, id, value)`
      
      Sets value (:ref:`Variant`) of a property.                  
      
                      
      
      
      :param `id`: 
      :type `id`: wx.propgrid.PGPropArgCls
      :param `value`: 
      :type `value`: PGVariant
      
      
      
      
      
      
      .. note:: 
      
         Use :meth:`ChangePropertyValue`   instead if you need to run through validation process and send property change event.   
      
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **SetPropertyValue** `(self, id, value)`
      
      Sets value (long integer) of a property.                  
      
      
      :param `id`: 
      :type `id`: wx.propgrid.PGPropArgCls
      :param `value`: 
      :type `value`: long
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`






   .. method:: SetPropertyValueString(self, id, value)

      Sets value (:ref:`String`) of a property.                  

                


      :param `id`: 
      :type `id`: wx.propgrid.PGPropArgCls
      :param `value`: 
      :type `value`: string






      .. note:: 

         This method uses :meth:`wx.propgrid.PGProperty.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.   








   .. method:: SetPropertyValueUnspecified(self, id)

      Sets property's value to unspecified.                  

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


      :param `id`: 
      :type `id`: wx.propgrid.PGPropArgCls







   .. method:: SetPropertyValues(self, dict_, autofill=False)

      Sets property values from a dictionary.
      
      :param `dict_`: the source of the property values to set, which can be
        either a dictionary or an object with a __dict__ attribute.
      :param `autofill`: If ``True``, keys with not relevant properties are
        auto-created. For more info, see :method:`AutoFill`.
      
      .. note::
           Keys starting with underscore are ignored.
           Attributes can be set with entries named like "@<propname>@<attr>".



   .. method:: SetValidationFailureBehavior(self, vfbFlags)

      Adjusts how :ref:`wx.propgrid.PropertyGrid`  behaves when invalid value is entered in a property.                  




      :param `vfbFlags`: See :ref:`PropertyGrid Validation Failure behaviour Flags <propertygrid validation failure behaviour flags>`  for possible values.   
      :type `vfbFlags`: int




                  





   .. method:: Sort(self, flags=0)

      Sorts all properties recursively.                  




      :param `flags`: This can contain any of the following options: ``wx.propgrid.PG_SORT_TOP_LEVEL_ONLY``: Only sort categories and their immediate children. Sorting done by ``wx.propgrid.PG_AUTO_SORT`` option uses this.  
      :type `flags`: int




                  



      .. seealso:: :meth:`SortChildren` , :meth:`wx.propgrid.PropertyGrid.SetSortFunction`     








   .. method:: SortChildren(self, id, flags=0)

      Sorts children of a property.                  




      :param `id`: Name or pointer to a property.  
      :type `id`: wx.propgrid.PGPropArgCls
      :param `flags`: This can contain any of the following options: ``wx.propgrid.PG_RECURSE``: Sorts recursively.  
      :type `flags`: int






                  



      .. seealso:: :meth:`Sort` , :meth:`wx.propgrid.PropertyGrid.SetSortFunction`     








   .. method:: _AutoFillMany(self,cat,dict_)




   .. method:: _AutoFillOne(self,cat,k,v)




   .. method:: _Items(self)

      This attribute is a pythonic iterator over all items in this
      `PropertyGrid` property container, excluding only private child
      properties. Usage is simple::
      
        for prop in propGrid.Items:
                print(prop)
      
      .. seealso:: `wx.propgrid.PropertyGridInterface.Properties`
            `wx.propgrid.PropertyGridInterface.GetPyVIterator`



   .. method:: _Properties(self)

      This attribute is a pythonic iterator over all properties in
      this `PropertyGrid` property container. It will only skip
      categories and private child properties. Usage is simple::
      
        for prop in propGrid.Properties:
                print(prop)
      
      .. seealso:: `wx.propgrid.PropertyGridInterface.Items`
            `wx.propgrid.PropertyGridInterface.GetPyIterator`



   .. attribute:: Items

      See :meth:`~wx.propgrid.PropertyGridInterface._Items`


   .. attribute:: Properties

      See :meth:`~wx.propgrid.PropertyGridInterface._Properties`


.. toctree::
   :maxdepth: 1
   :hidden:

   wx.propgrid.PropertyGridInterface.EditableStateFlags.enumeration
