.. 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.RichTextStyleListCtrl:

==========================================================================================================================================
|phoenix_title|  **wx.richtext.RichTextStyleListCtrl**
==========================================================================================================================================

This class incorporates a :ref:`wx.richtext.RichTextStyleListBox`  and a choice control that allows the user to select the category of style to view.          

It is demonstrated in the :ref:`wx.richtext.RichTextCtrl`  sample in  ``samples/richtext`` . 

To use :ref:`wx.richtext.RichTextStyleListCtrl`, add the control to your window hierarchy and call :meth:`wx.richtext.RichTextStyleListCtrl.SetStyleType`   with one of :meth:`RichTextStyleListBox.__init__` , :meth:`RichTextStyleListBox.__init__` , :meth:`RichTextStyleListBox.__init__`   and :meth:`RichTextStyleListBox.__init__`   to set the current view. 

Associate the control with a style sheet and rich text control with SetStyleSheet and SetRichTextCtrl, so that when a style is double-clicked, it is applied to the selection. 





.. _RichTextStyleListCtrl-styles:

|styles| Window Styles
================================

This class supports the following styles: 

  

- ``RICHTEXTSTYLELIST_HIDE_TYPE_SELECTOR``: This style hides the category selection control.  










|

|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>RichTextStyleListCtrl</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.RichTextStyleListCtrl_inheritance.png" alt="Inheritance diagram of RichTextStyleListCtrl" 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.Control.html" title="wx.Control" alt="" coords="72,237,160,267"/> <area shape="rect" id="node6" href="wx.richtext.RichTextStyleListCtrl.html" title="wx.richtext.RichTextStyleListCtrl" alt="" coords="5,315,227,344"/> <area shape="rect" id="node2" href="wx.Window.html" title="wx.Window" alt="" coords="71,160,160,189"/> <area shape="rect" id="node3" href="wx.Object.html" title="wx.Object" alt="" coords="17,5,99,35"/> <area shape="rect" id="node5" href="wx.EvtHandler.html" title="wx.EvtHandler" alt="" coords="60,83,171,112"/> <area shape="rect" id="node4" href="wx.Trackable.html" title="wx.Trackable" alt="" coords="124,5,225,35"/> </map> 
   </p>

|


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

================================================================================ ================================================================================
:meth:`~wx.richtext.RichTextStyleListCtrl.__init__`                              Constructors.
:meth:`~wx.richtext.RichTextStyleListCtrl.Create`                                Creates the windows.
:meth:`~wx.richtext.RichTextStyleListCtrl.GetRichTextCtrl`                       Returns the associated rich text control, if any.
:meth:`~wx.richtext.RichTextStyleListCtrl.GetStyleChoice`                        Returns the :ref:`wx.Choice`  control used for selecting the style category.
:meth:`~wx.richtext.RichTextStyleListCtrl.GetStyleListBox`                       Returns the :ref:`wx.ListBox`  control used to view the style list.
:meth:`~wx.richtext.RichTextStyleListCtrl.GetStyleSheet`                         Returns the associated style sheet, if any.
:meth:`~wx.richtext.RichTextStyleListCtrl.GetStyleType`                          Returns the type of style to show in the list box.
:meth:`~wx.richtext.RichTextStyleListCtrl.SetRichTextCtrl`                       Associates the control with a :ref:`wx.richtext.RichTextCtrl`.
:meth:`~wx.richtext.RichTextStyleListCtrl.SetStyleSheet`                         Associates the control with a style sheet.
:meth:`~wx.richtext.RichTextStyleListCtrl.SetStyleType`                          Sets the style type to display.
:meth:`~wx.richtext.RichTextStyleListCtrl.UpdateStyles`                          Updates the style list box.
================================================================================ ================================================================================


|


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

================================================================================ ================================================================================
:attr:`~wx.richtext.RichTextStyleListCtrl.RichTextCtrl`                          See :meth:`~wx.richtext.RichTextStyleListCtrl.GetRichTextCtrl` and :meth:`~wx.richtext.RichTextStyleListCtrl.SetRichTextCtrl`
:attr:`~wx.richtext.RichTextStyleListCtrl.StyleChoice`                           See :meth:`~wx.richtext.RichTextStyleListCtrl.GetStyleChoice`
:attr:`~wx.richtext.RichTextStyleListCtrl.StyleListBox`                          See :meth:`~wx.richtext.RichTextStyleListCtrl.GetStyleListBox`
:attr:`~wx.richtext.RichTextStyleListCtrl.StyleSheet`                            See :meth:`~wx.richtext.RichTextStyleListCtrl.GetStyleSheet` and :meth:`~wx.richtext.RichTextStyleListCtrl.SetStyleSheet`
:attr:`~wx.richtext.RichTextStyleListCtrl.StyleType`                             See :meth:`~wx.richtext.RichTextStyleListCtrl.GetStyleType` and :meth:`~wx.richtext.RichTextStyleListCtrl.SetStyleType`
================================================================================ ================================================================================


|


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


.. class:: wx.richtext.RichTextStyleListCtrl(Control)

   **Possible constructors**::

       RichTextStyleListCtrl(parent, id=ID_ANY, pos=DefaultPosition,
                             size=DefaultSize, style=0)
       
       RichTextStyleListCtrl()
       
   
   This class incorporates a RichTextStyleListBox and a choice control
   that allows the user to select the category of style to view.



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

      Constructors.                   


      |overload| Overloaded Implementations:

      **~~~**

      
      **__init__** `(self, parent, id=ID_ANY, pos=DefaultPosition, size=DefaultSize, style=0)`
      
      
      
      
      :param `parent`: 
      :type `parent`: wx.Window
      :param `id`: 
      :type `id`: wx.WindowID
      :param `pos`: 
      :type `pos`: wx.Point
      :param `size`: 
      :type `size`: wx.Size
      :param `style`: 
      :type `style`: long
      
      
      
      
      
      
      **~~~**

      
      **__init__** `(self)`
      
      
      
      
      
      **~~~**






   .. method:: Create(self, parent, id=ID_ANY, pos=DefaultPosition, size=DefaultSize, style=0)

      Creates the windows.                  


      :param `parent`: 
      :type `parent`: wx.Window
      :param `id`: 
      :type `id`: wx.WindowID
      :param `pos`: 
      :type `pos`: wx.Point
      :param `size`: 
      :type `size`: wx.Size
      :param `style`: 
      :type `style`: long




      :rtype: `bool`








   .. method:: GetRichTextCtrl(self)

      Returns the associated rich text control, if any.                  

      :rtype: :ref:`wx.richtext.RichTextCtrl`








   .. method:: GetStyleChoice(self)

      Returns the :ref:`wx.Choice`  control used for selecting the style category.                  

      :rtype: :ref:`Choice`








   .. method:: GetStyleListBox(self)

      Returns the :ref:`wx.ListBox`  control used to view the style list.                  

      :rtype: :ref:`wx.richtext.RichTextStyleListBox`








   .. method:: GetStyleSheet(self)

      Returns the associated style sheet, if any.                  

      :rtype: :ref:`wx.richtext.RichTextStyleSheet`








   .. method:: GetStyleType(self)

      Returns the type of style to show in the list box.                  

      :rtype: :ref:`wx.richtext.RichTextStyleListBox.wxRichTextStyleType`








   .. method:: SetRichTextCtrl(self, ctrl)

      Associates the control with a :ref:`wx.richtext.RichTextCtrl`.                  


      :param `ctrl`: 
      :type `ctrl`: wx.richtext.RichTextCtrl







   .. method:: SetStyleSheet(self, styleSheet)

      Associates the control with a style sheet.                  


      :param `styleSheet`: 
      :type `styleSheet`: wx.richtext.RichTextStyleSheet







   .. method:: SetStyleType(self, styleType)

      Sets the style type to display.                  

      One of

      - :meth:`RichTextStyleListBox.__init__` , 
      - :meth:`RichTextStyleListBox.__init__` , 
      - :meth:`RichTextStyleListBox.__init__`  
      - :meth:`RichTextStyleListBox.__init__` .  


                 


      :param `styleType`: 
      :type `styleType`: RichTextStyleListBox.wxRichTextStyleType







   .. method:: UpdateStyles(self)

      Updates the style list box.                   





   .. attribute:: RichTextCtrl

      See :meth:`~wx.richtext.RichTextStyleListCtrl.GetRichTextCtrl` and :meth:`~wx.richtext.RichTextStyleListCtrl.SetRichTextCtrl`


   .. attribute:: StyleChoice

      See :meth:`~wx.richtext.RichTextStyleListCtrl.GetStyleChoice`


   .. attribute:: StyleListBox

      See :meth:`~wx.richtext.RichTextStyleListCtrl.GetStyleListBox`


   .. attribute:: StyleSheet

      See :meth:`~wx.richtext.RichTextStyleListCtrl.GetStyleSheet` and :meth:`~wx.richtext.RichTextStyleListCtrl.SetStyleSheet`


   .. attribute:: StyleType

      See :meth:`~wx.richtext.RichTextStyleListCtrl.GetStyleType` and :meth:`~wx.richtext.RichTextStyleListCtrl.SetStyleType`

