wx.richtext.RichTextStyleListCtrl¶
This class incorporates a wx.richtext.RichTextStyleListBox and a choice control that allows the user to select the category of style to view.
It is demonstrated in the wx.richtext.RichTextCtrl sample in samples/richtext
.
To use wx.richtext.RichTextStyleListCtrl, add the control to your window hierarchy and call wx.richtext.RichTextStyleListCtrl.SetStyleType
with one of RichTextStyleListBox.__init__
, RichTextStyleListBox.__init__
, RichTextStyleListBox.__init__
and 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.
Window Styles¶
This class supports the following styles:
RICHTEXTSTYLELIST_HIDE_TYPE_SELECTOR
: This style hides the category selection control.
Class Hierarchy¶
Methods Summary¶
Constructors. |
|
Creates the windows. |
|
Returns the associated rich text control, if any. |
|
Returns the wx.Choice control used for selecting the style category. |
|
Returns the wx.ListBox control used to view the style list. |
|
Returns the associated style sheet, if any. |
|
Returns the type of style to show in the list box. |
|
Associates the control with a wx.richtext.RichTextCtrl. |
|
Associates the control with a style sheet. |
|
Sets the style type to display. |
|
Updates the style list box. |
Properties Summary¶
See |
|
See |
|
See |
|
See |
|
See |
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.
Methods¶
- __init__(self, *args, **kw)¶
-
__init__ (self, parent, id=ID_ANY, pos=DefaultPosition, size=DefaultSize, style=0)
Constructors.
- Parameters:
- Return type:
None
__init__ (self)
- Return type:
None
- Create(self, parent, id=ID_ANY, pos=DefaultPosition, size=DefaultSize, style=0)¶
Creates the windows.
- static GetClassDefaultAttributes(variant=WINDOW_VARIANT_NORMAL)¶
- Parameters:
variant (WindowVariant)
- Return type:
VisualAttributes
- GetRichTextCtrl(self)¶
Returns the associated rich text control, if any.
- Return type:
- GetStyleChoice(self)¶
Returns the wx.Choice control used for selecting the style category.
- Return type:
Choice
- GetStyleListBox(self)¶
Returns the wx.ListBox control used to view the style list.
- Return type:
- GetStyleSheet(self)¶
Returns the associated style sheet, if any.
- Return type:
- GetStyleType(self)¶
Returns the type of style to show in the list box.
- Return type:
wx.richtext.RichTextStyleListBox.wxRichTextStyleType
- SetRichTextCtrl(self, ctrl)¶
Associates the control with a wx.richtext.RichTextCtrl.
- Parameters:
ctrl (wx.richtext.RichTextCtrl)
- Return type:
None
- SetStyleSheet(self, styleSheet)¶
Associates the control with a style sheet.
- Parameters:
styleSheet (wx.richtext.RichTextStyleSheet)
- Return type:
None
- SetStyleType(self, styleType)¶
Sets the style type to display.
One of
RichTextStyleListBox.__init__
,RichTextStyleListBox.__init__
,RichTextStyleListBox.__init__
RichTextStyleListBox.__init__
.
- Parameters:
styleType (RichTextStyleListBox.wxRichTextStyleType)
- Return type:
None
- UpdateStyles(self)¶
Updates the style list box.
- Return type:
None
Properties¶
- RichTextCtrl¶
See
GetRichTextCtrl
andSetRichTextCtrl
- StyleChoice¶
See
GetStyleChoice
- StyleListBox¶
See
GetStyleListBox
- StyleSheet¶
See
GetStyleSheet
andSetStyleSheet
- StyleType¶
See
GetStyleType
andSetStyleType