.. 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.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.svg" alt="Inheritance diagram of RichTextStyleListCtrl" 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.RichTextStyleListCtrl.html" title="This class incorporates a wx.richtext.RichTextStyleListBox  and a choice control that allows the user to select the category of style to view." alt="" coords="5,313,261,341"/> <area shape="rect" id="node2" href="wx.Control.html" title="This is the base class for a control or 'widget'." alt="" coords="81,236,186,265"/> <area shape="rect" id="node3" href="wx.Window.html" title="wx.Window  is the base class for all windows and represents any visible object on screen." alt="" coords="78,159,189,188"/> <area shape="rect" id="node4" href="wx.EvtHandler.html" title="A class that can handle events from the windowing system." alt="" coords="67,82,200,111"/> <area shape="rect" id="node5" href="wx.Object.html" title="This is the root class of many of the wxWidgets classes." alt="" coords="17,5,116,34"/> <area shape="rect" id="node6" href="wx.Trackable.html" title="Add-on base class for a trackable object." alt="" coords="140,5,263,34"/> </map> 
   </p>
   </div>

|


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

================================================================================ ================================================================================
:meth:`~wx.richtext.RichTextStyleListCtrl.__init__`                              Constructors.
:meth:`~wx.richtext.RichTextStyleListCtrl.Create`                                Creates the windows.
:meth:`~wx.richtext.RichTextStyleListCtrl.GetClassDefaultAttributes`             
: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) -> None
       
       RichTextStyleListCtrl() -> None
       
   
   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)



      |overload| **Overloaded Implementations:**

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

      
      **__init__** `(self, parent, id=ID_ANY, pos=DefaultPosition, size=DefaultSize, style=0)`
      
      Constructors. 
                       
      
      
      :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: `None`     
      
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **__init__** `(self)`
      
      
      
      :rtype: `None`     
      
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`






   .. 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`








   .. staticmethod:: GetClassDefaultAttributes(variant=WINDOW_VARIANT_NORMAL)




      :param `variant`: 
      :type `variant`: wx.WindowVariant




      :rtype: `VisualAttributes`     








   .. 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: `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: `wx.richtext.RichTextStyleListBox.wxRichTextStyleType`     








   .. method:: SetRichTextCtrl(self, ctrl)

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


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




      :rtype: `None`     








   .. method:: SetStyleSheet(self, styleSheet)

      Associates the control with a style sheet. 
                 


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




      :rtype: `None`     








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




      :rtype: `None`     








   .. method:: UpdateStyles(self)

      Updates the style list box. 
                 

      :rtype: `None`     








   .. 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`

