.. 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.richtext.RichTextProperties:

==========================================================================================================================================
|phoenix_title|  **wx.richtext.RichTextProperties**
==========================================================================================================================================

A simple property class using Variants.          

This is used to give each rich text object the ability to store custom properties that can be used by the application. 





         



.. seealso:: :ref:`wx.richtext.RichTextBuffer`, :ref:`wx.richtext.RichTextObject`, :ref:`wx.richtext.RichTextCtrl`    







|

|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>RichTextProperties</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.richtext.RichTextProperties_inheritance.png" alt="Inheritance diagram of RichTextProperties" 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.richtext.RichTextProperties.html" title="wx.richtext.RichTextProperties" alt="" coords="5,83,225,112"/> <area shape="rect" id="node2" href="wx.Object.html" title="wx.Object" alt="" coords="72,5,159,35"/> </map> 
   </p>
   </div>

|


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

================================================================================ ================================================================================
:meth:`~wx.richtext.RichTextProperties.__init__`                                 Default constructor.
:meth:`~wx.richtext.RichTextProperties.Clear`                                    Clears the properties.
:meth:`~wx.richtext.RichTextProperties.Copy`                                     Copies from `props`.
:meth:`~wx.richtext.RichTextProperties.Find`                                     Finds the given property.
:meth:`~wx.richtext.RichTextProperties.FindOrCreateProperty`                     Finds or creates a property with the given name, returning a pointer to the variant.
:meth:`~wx.richtext.RichTextProperties.GetCount`                                 Returns a count of the properties.
:meth:`~wx.richtext.RichTextProperties.GetProperties`                            Returns the array of variants implementing the properties.
:meth:`~wx.richtext.RichTextProperties.GetProperty`                              Gets the property variant by name.
:meth:`~wx.richtext.RichTextProperties.GetPropertyBool`                          Gets the value of the named property as a boolean.
:meth:`~wx.richtext.RichTextProperties.GetPropertyDouble`                        Gets the value of the named property as a double.
:meth:`~wx.richtext.RichTextProperties.GetPropertyLong`                          Gets the value of the named property as a long integer.
:meth:`~wx.richtext.RichTextProperties.GetPropertyNames`                         Returns all the property names.
:meth:`~wx.richtext.RichTextProperties.GetPropertyString`                        Gets the value of the named property as a string.
:meth:`~wx.richtext.RichTextProperties.HasProperty`                              Returns ``True`` if the given property is found.
:meth:`~wx.richtext.RichTextProperties.MergeProperties`                          Merges the given properties with these properties.
:meth:`~wx.richtext.RichTextProperties.Remove`                                   Removes the given property.
:meth:`~wx.richtext.RichTextProperties.RemoveProperties`                         Removes the given properties from these properties.
:meth:`~wx.richtext.RichTextProperties.SetProperties`                            Sets the array of variants.
:meth:`~wx.richtext.RichTextProperties.SetProperty`                              Sets the property by passing a variant which contains a name and value.
:meth:`~wx.richtext.RichTextProperties.__eq__`                                   Equality operator.
================================================================================ ================================================================================


|


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

================================================================================ ================================================================================
:attr:`~wx.richtext.RichTextProperties.Count`                                    See :meth:`~wx.richtext.RichTextProperties.GetCount`
:attr:`~wx.richtext.RichTextProperties.Properties`                               See :meth:`~wx.richtext.RichTextProperties.GetProperties` and :meth:`~wx.richtext.RichTextProperties.SetProperties`
:attr:`~wx.richtext.RichTextProperties.PropertyNames`                            See :meth:`~wx.richtext.RichTextProperties.GetPropertyNames`
================================================================================ ================================================================================


|


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


.. class:: wx.richtext.RichTextProperties(Object)

   **Possible constructors**::

       RichTextProperties()
       
       RichTextProperties(props)
       
   
   A simple property class using Variants.



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



      |overload| Overloaded Implementations:

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

      
      **__init__** `(self)`
      
      Default constructor.                   
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **__init__** `(self, props)`
      
      Copy constructor.                  
      
      
      :param `props`: 
      :type `props`: wx.richtext.RichTextProperties
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`






   .. method:: Clear(self)

      Clears the properties.                   





   .. method:: Copy(self, props)

      Copies from `props`.                  


      :param `props`: 
      :type `props`: wx.richtext.RichTextProperties







   .. method:: Find(self, name)

      Finds the given property.                  


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




      :rtype: `int`








   .. method:: FindOrCreateProperty(self, name)

      Finds or creates a property with the given name, returning a pointer to the variant.                  


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




      :rtype: :ref:`Variant`








   .. method:: GetCount(self)

      Returns a count of the properties.                  

      :rtype: `int`








   .. method:: GetProperties(self)

      Returns the array of variants implementing the properties.                  

      :rtype: :ref:`RichTextVariantArray`








   .. method:: GetProperty(self, name)

      Gets the property variant by name.                  


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




      :rtype: :ref:`Variant`








   .. method:: GetPropertyBool(self, name)

      Gets the value of the named property as a boolean.                  


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




      :rtype: `bool`








   .. method:: GetPropertyDouble(self, name)

      Gets the value of the named property as a double.                  


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




      :rtype: `float`








   .. method:: GetPropertyLong(self, name)

      Gets the value of the named property as a long integer.                  


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




      :rtype: `long`








   .. method:: GetPropertyNames(self)

      Returns all the property names.                  

      :rtype: `list of strings`








   .. method:: GetPropertyString(self, name)

      Gets the value of the named property as a string.                  


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




      :rtype: `string`








   .. method:: HasProperty(self, name)

      Returns ``True`` if the given property is found.                  


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




      :rtype: `bool`








   .. method:: MergeProperties(self, properties)

      Merges the given properties with these properties.                  


      :param `properties`: 
      :type `properties`: wx.richtext.RichTextProperties







   .. method:: Remove(self, name)

      Removes the given property.                  


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




      :rtype: `bool`








   .. method:: RemoveProperties(self, properties)

      Removes the given properties from these properties.                  


      :param `properties`: 
      :type `properties`: wx.richtext.RichTextProperties







   .. method:: SetProperties(self, props)

      Sets the array of variants.                  


      :param `props`: 
      :type `props`: RichTextVariantArray







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



      |overload| Overloaded Implementations:

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

      
      **SetProperty** `(self, variant)`
      
      Sets the property by passing a variant which contains a name and value.                  
      
      
      :param `variant`: 
      :type `variant`: Variant
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **SetProperty** `(self, name, variant)`
      
      Sets a property by name and variant.                  
      
      
      :param `name`: 
      :type `name`: string
      :param `variant`: 
      :type `variant`: Variant
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **SetProperty** `(self, name, value)`
      
      Sets a property by name and string value.                  
      
      
      :param `name`: 
      :type `name`: string
      :param `value`: 
      :type `value`: string
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **SetProperty** `(self, name, value)`
      
      Sets a property by name and Char value.                  
      
      
      :param `name`: 
      :type `name`: string
      :param `value`: 
      :type `value`: wx.Char
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **SetProperty** `(self, name, value)`
      
      Sets property by name and long integer value.                  
      
      
      :param `name`: 
      :type `name`: string
      :param `value`: 
      :type `value`: long
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **SetProperty** `(self, name, value)`
      
      Sets property by name and float value.                  
      
      
      :param `name`: 
      :type `name`: string
      :param `value`: 
      :type `value`: float
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`






   .. method:: __eq__(self)

      Equality operator.                  


      :param `props`: 
      :type `props`: wx.richtext.RichTextProperties







   .. attribute:: Count

      See :meth:`~wx.richtext.RichTextProperties.GetCount`


   .. attribute:: Properties

      See :meth:`~wx.richtext.RichTextProperties.GetProperties` and :meth:`~wx.richtext.RichTextProperties.SetProperties`


   .. attribute:: PropertyNames

      See :meth:`~wx.richtext.RichTextProperties.GetPropertyNames`

