 wx.richtext.RichTextStyleListBox¶
 wx.richtext.RichTextStyleListBox¶This is a listbox that can display the styles in a wx.richtext.RichTextStyleSheet, and apply the selection to an associated wx.richtext.RichTextCtrl.
See  samples/richtext   for an example of how to use it.
 Class Hierarchy¶
 Class Hierarchy¶ Inheritance diagram for class RichTextStyleListBox:
Inheritance diagram for class RichTextStyleListBox:
 Methods Summary¶
 Methods Summary¶| Constructor. | |
| Applies the ith style to the associated rich text control. | |
| Converts units in tenths of a millimetre to device units. | |
| Creates the window. | |
| Creates a suitable HTML fragment for a definition. | |
| If the return value is  | |
| Returns the wx.richtext.RichTextCtrl associated with this listbox. | |
| Gets a style for a listbox index. | |
| Returns the style sheet associated with this listbox. | |
| Returns the type of style to show in the list box. | |
| Returns the HTML for this item. | |
| Implements left click behaviour, applying the clicked style to the wx.richtext.RichTextCtrl. | |
| If applyOnSelection  is  | |
| Associates the listbox with a wx.richtext.RichTextCtrl. | |
| Associates the control with a style sheet. | |
| Sets the style type to display. | |
| Updates the list from the associated style sheet. | 
 Properties Summary¶
 Properties Summary¶| See  | |
| See  | |
| See  | 
 Class API¶
 Class API¶Possible constructors:
RichTextStyleListBox(parent, id=ID_ANY, pos=DefaultPosition,
                     size=DefaultSize, style=0) -> None
RichTextStyleListBox() -> None
This is a listbox that can display the styles in a RichTextStyleSheet, and apply the selection to an associated RichTextCtrl.
__init__ (self, parent, id=ID_ANY, pos=DefaultPosition, size=DefaultSize, style=0)
Constructor.
None
__init__ (self)
None
Applies the ith style to the associated rich text control.
i (int)
None
Converts units in tenths of a millimetre to device units.
dc (wx.DC)
units (int)
int
Creates the window.
Creates a suitable HTML fragment for a definition.
styleDef (wx.richtext.RichTextStyleDefinition)
str
If the return value is True, clicking on a style name in the list will immediately apply the style to the associated rich text control.
bool
variant (WindowVariant)
VisualAttributes
Returns the wx.richtext.RichTextCtrl associated with this listbox.
Gets a style for a listbox index.
i (int)
Returns the style sheet associated with this listbox.
Returns the type of style to show in the list box.
wx.richtext.RichTextStyleListBox.wxRichTextStyleType
Returns the HTML for this item.
n (int)
str
Implements left click behaviour, applying the clicked style to the wx.richtext.RichTextCtrl.
event (wx.MouseEvent)
None
If applyOnSelection  is True, clicking on a style name in the list will immediately apply the style to the associated rich text control.
applyOnSelection (bool)
None
Associates the listbox with a wx.richtext.RichTextCtrl.
ctrl (wx.richtext.RichTextCtrl)
None
Associates the control with a style sheet.
styleSheet (wx.richtext.RichTextStyleSheet)
None
Sets the style type to display.
One of
RichTextStyleListBox.__init__ ,
RichTextStyleListBox.__init__ ,
RichTextStyleListBox.__init__
RichTextStyleListBox.__init__ .
styleType (RichTextStyleListBox.wxRichTextStyleType)
None
Updates the list from the associated style sheet.
None
See GetRichTextCtrl and SetRichTextCtrl
See GetStyleSheet and SetStyleSheet
See GetStyleType and SetStyleType