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

Inheritance diagram for class
RichTextStyleListCtrl:
|
|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 : Window, id: int=ID_ANY, pos:
Point=DefaultPosition, size: Size=DefaultSize, style: int=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:`
`
**__init__** `(self, parent : Window, id: int=ID_ANY, pos: Point=DefaultPosition, size: Size=DefaultSize, style: int=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:`
`
**__init__** `(self)`
:rtype: `None`
:html:`
`
.. method:: Create(self, parent : Window, id: int=ID_ANY, pos: Point=DefaultPosition, size: Size=DefaultSize, style: int=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: WindowVariant=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 : RichTextCtrl)
Associates the control with a :ref:`wx.richtext.RichTextCtrl`.
:param `ctrl`:
:type `ctrl`: wx.richtext.RichTextCtrl
:rtype: `None`
.. method:: SetStyleSheet(self, styleSheet : RichTextStyleSheet)
Associates the control with a style sheet.
:param `styleSheet`:
:type `styleSheet`: wx.richtext.RichTextStyleSheet
:rtype: `None`
.. method:: SetStyleType(self, styleType : RichTextStyleListBox.wxRichTextStyleType)
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`