.. wxPython Phoenix documentation

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

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

.. include:: headings.inc



.. _wx.richtext.TextAttrBorder:

==========================================================================================================================================
|phoenix_title|  **wx.richtext.TextAttrBorder**
==========================================================================================================================================

A class representing a rich text object border.          







         



.. seealso:: :ref:`wx.richtext.RichTextAttr`, :ref:`wx.richtext.RichTextCtrl`, RichTextAttrBorders   







|

|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>TextAttrBorder</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.TextAttrBorder_inheritance.png" alt="Inheritance diagram of TextAttrBorder" usemap="#dummy" class="inheritance"/></center>
   </div>
   <script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
   <map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.richtext.TextAttrBorder.html" title="wx.richtext.TextAttrBorder" alt="" coords="5,5,192,35"/> </map> 
   </p>

|


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

================================================================================ ================================================================================
:meth:`~wx.richtext.TextAttrBorder.__init__`                                     Default constructor.
:meth:`~wx.richtext.TextAttrBorder.AddFlag`                                      Adds a border flag.
:meth:`~wx.richtext.TextAttrBorder.Apply`                                        Applies the border to this object, but not if the same as `compareWith`.
:meth:`~wx.richtext.TextAttrBorder.CollectCommonAttributes`                      Collects the attributes that are common to a range of content, building up a note of which attributes are absent in some objects and which clash in some objects.
:meth:`~wx.richtext.TextAttrBorder.EqPartial`                                    Partial equality test.
:meth:`~wx.richtext.TextAttrBorder.GetColour`                                    Gets the colour.
:meth:`~wx.richtext.TextAttrBorder.GetColourLong`                                Gets the colour as a long.
:meth:`~wx.richtext.TextAttrBorder.GetFlags`                                     Returns the border flags.
:meth:`~wx.richtext.TextAttrBorder.GetStyle`                                     Gets the border style.
:meth:`~wx.richtext.TextAttrBorder.GetWidth`                                     Gets the border width.
:meth:`~wx.richtext.TextAttrBorder.HasColour`                                    True if the border has a valid colour.
:meth:`~wx.richtext.TextAttrBorder.HasStyle`                                     True if the border has a valid style.
:meth:`~wx.richtext.TextAttrBorder.HasWidth`                                     True if the border has a valid width.
:meth:`~wx.richtext.TextAttrBorder.IsDefault`                                    True if the border has no attributes set.
:meth:`~wx.richtext.TextAttrBorder.IsValid`                                      True if the border is valid.
:meth:`~wx.richtext.TextAttrBorder.MakeValid`                                    Set the valid flag for this border.
:meth:`~wx.richtext.TextAttrBorder.RemoveFlag`                                   Removes a border flag.
:meth:`~wx.richtext.TextAttrBorder.RemoveStyle`                                  Removes the specified attributes from this object.
:meth:`~wx.richtext.TextAttrBorder.Reset`                                        Resets the border style, colour, width and flags.
:meth:`~wx.richtext.TextAttrBorder.SetColour`                                    Sets the border colour.
:meth:`~wx.richtext.TextAttrBorder.SetFlags`                                     Sets the border flags.
:meth:`~wx.richtext.TextAttrBorder.SetStyle`                                     Sets the border style.
:meth:`~wx.richtext.TextAttrBorder.SetWidth`                                     Sets the border width.
:meth:`~wx.richtext.TextAttrBorder.__nonzero__`                                  
:meth:`~wx.richtext.TextAttrBorder.__eq__`                                       Equality operator.
================================================================================ ================================================================================


|


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

================================================================================ ================================================================================
:attr:`~wx.richtext.TextAttrBorder.Colour`                                       See :meth:`~wx.richtext.TextAttrBorder.GetColour` and :meth:`~wx.richtext.TextAttrBorder.SetColour`
:attr:`~wx.richtext.TextAttrBorder.ColourLong`                                   See :meth:`~wx.richtext.TextAttrBorder.GetColourLong`
:attr:`~wx.richtext.TextAttrBorder.Flags`                                        See :meth:`~wx.richtext.TextAttrBorder.GetFlags` and :meth:`~wx.richtext.TextAttrBorder.SetFlags`
:attr:`~wx.richtext.TextAttrBorder.Style`                                        See :meth:`~wx.richtext.TextAttrBorder.GetStyle` and :meth:`~wx.richtext.TextAttrBorder.SetStyle`
:attr:`~wx.richtext.TextAttrBorder.Width`                                        See :meth:`~wx.richtext.TextAttrBorder.GetWidth` and :meth:`~wx.richtext.TextAttrBorder.SetWidth`
:attr:`~wx.richtext.TextAttrBorder.m_borderColour`                               A public C++ attribute of type ``long``.
:attr:`~wx.richtext.TextAttrBorder.m_borderStyle`                                A public C++ attribute of type ``int``.
:attr:`~wx.richtext.TextAttrBorder.m_borderWidth`                                A public C++ attribute of type :ref:`~wx.richtext.TextAttrDimension`.
:attr:`~wx.richtext.TextAttrBorder.m_flags`                                      A public C++ attribute of type ``int``.
================================================================================ ================================================================================


|


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


.. class:: wx.richtext.TextAttrBorder(object)

   **Possible constructors**::

       TextAttrBorder()
       
   
   A class representing a rich text object border.



   .. method:: __init__(self)

      Default constructor.                   





   .. method:: AddFlag(self, flag)

      Adds a border flag.                  


      :param `flag`: 
      :type `flag`: int







   .. method:: Apply(self, border, compareWith=None)

      Applies the border to this object, but not if the same as `compareWith`.                  


      :param `border`: 
      :type `border`: wx.richtext.TextAttrBorder
      :param `compareWith`: 
      :type `compareWith`: wx.richtext.TextAttrBorder




      :rtype: `bool`








   .. method:: CollectCommonAttributes(self, attr, clashingAttr, absentAttr)

      Collects the attributes that are common to a range of content, building up a note of which attributes are absent in some objects and which clash in some objects.                  


      :param `attr`: 
      :type `attr`: wx.richtext.TextAttrBorder
      :param `clashingAttr`: 
      :type `clashingAttr`: wx.richtext.TextAttrBorder
      :param `absentAttr`: 
      :type `absentAttr`: wx.richtext.TextAttrBorder







   .. method:: EqPartial(self, border, weakTest=True)

      Partial equality test.                  

      If `weakTest`  is ``True``, attributes of this object do not have to be present if those attributes of `border`  are present. If `weakTest`  is ``False``, the function will fail if an attribute is present in `border`  but not in this object.                  


      :param `border`: 
      :type `border`: wx.richtext.TextAttrBorder
      :param `weakTest`: 
      :type `weakTest`: bool




      :rtype: `bool`








   .. method:: GetColour(self)

      Gets the colour.                  

      :rtype: :ref:`Colour`








   .. method:: GetColourLong(self)

      Gets the colour as a long.                  

      :rtype: `int`








   .. method:: GetFlags(self)

      Returns the border flags.                  

      :rtype: `int`








   .. method:: GetStyle(self)

      Gets the border style.                  

      :rtype: `int`








   .. method:: GetWidth(self)

      Gets the border width.                  

      :rtype: :ref:`wx.richtext.TextAttrDimension`








   .. method:: HasColour(self)

      True if the border has a valid colour.                  

      :rtype: `bool`








   .. method:: HasStyle(self)

      True if the border has a valid style.                  

      :rtype: `bool`








   .. method:: HasWidth(self)

      True if the border has a valid width.                  

      :rtype: `bool`








   .. method:: IsDefault(self)

      True if the border has no attributes set.                  

      :rtype: `bool`








   .. method:: IsValid(self)

      True if the border is valid.                  

      :rtype: `bool`








   .. method:: MakeValid(self)

      Set the valid flag for this border.                   





   .. method:: RemoveFlag(self, flag)

      Removes a border flag.                  


      :param `flag`: 
      :type `flag`: int







   .. method:: RemoveStyle(self, attr)

      Removes the specified attributes from this object.                  


      :param `attr`: 
      :type `attr`: wx.richtext.TextAttrBorder




      :rtype: `bool`








   .. method:: Reset(self)

      Resets the border style, colour, width and flags.                   





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

      Sets the border colour.                   


      |overload| Overloaded Implementations:

      **~~~**

      
      **SetColour** `(self, colour)`
      
      
      
      
      :param `colour`: 
      :type `colour`: long
      
      
      
      
      
      
      **~~~**

      
      **SetColour** `(self, colour)`
      
      
      
      
      :param `colour`: 
      :type `colour`: wx.Colour
      
      
      
      
      
      
      **~~~**






   .. method:: SetFlags(self, flags)

      Sets the border flags.                  


      :param `flags`: 
      :type `flags`: int







   .. method:: SetStyle(self, style)

      Sets the border style.                  


      :param `style`: 
      :type `style`: int







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

      Sets the border width.                   


      |overload| Overloaded Implementations:

      **~~~**

      
      **SetWidth** `(self, width)`
      
      
      
      
      :param `width`: 
      :type `width`: wx.richtext.TextAttrDimension
      
      
      
      
      
      
      **~~~**

      
      **SetWidth** `(self, value, units=TEXT_ATTR_UNITS_TENTHS_MM)`
      
      
      
      
      :param `value`: 
      :type `value`: int
      :param `units`: 
      :type `units`: wx.richtext.TextAttrUnits
      
      
      
      
      
      
      **~~~**






   .. method:: __nonzero__(self)



      :rtype: `int`








   .. method:: __eq__(self)

      Equality operator.                  


      :param `border`: 
      :type `border`: wx.richtext.TextAttrBorder







   .. attribute:: Colour

      See :meth:`~wx.richtext.TextAttrBorder.GetColour` and :meth:`~wx.richtext.TextAttrBorder.SetColour`


   .. attribute:: ColourLong

      See :meth:`~wx.richtext.TextAttrBorder.GetColourLong`


   .. attribute:: Flags

      See :meth:`~wx.richtext.TextAttrBorder.GetFlags` and :meth:`~wx.richtext.TextAttrBorder.SetFlags`


   .. attribute:: Style

      See :meth:`~wx.richtext.TextAttrBorder.GetStyle` and :meth:`~wx.richtext.TextAttrBorder.SetStyle`


   .. attribute:: Width

      See :meth:`~wx.richtext.TextAttrBorder.GetWidth` and :meth:`~wx.richtext.TextAttrBorder.SetWidth`


   .. attribute:: m_borderColour

      A public C++ attribute of type ``long``.


   .. attribute:: m_borderStyle

      A public C++ attribute of type ``int``.


   .. attribute:: m_borderWidth

      A public C++ attribute of type :ref:`~wx.richtext.TextAttrDimension`.


   .. attribute:: m_flags

      A public C++ attribute of type ``int``.

