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.
^^
This class supports the following styles:
RICHTEXTSTYLELIST_HIDE_TYPE_SELECTOR
: This style hides the category selection control. ^^
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. |
See |
|
See |
|
See |
|
See |
|
See |
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.
__init__
(self, *args, **kw)¶Constructors.
__init__ (self, parent, id=ID_ANY, pos=DefaultPosition, size=DefaultSize, style=0)
__init__ (self)
Create
(self, parent, id=ID_ANY, pos=DefaultPosition, size=DefaultSize, style=0)¶Creates the windows.
GetClassDefaultAttributes
(variant=WINDOW_VARIANT_NORMAL)¶variant (WindowVariant) –
VisualAttributes
GetRichTextCtrl
(self)¶Returns the associated rich text control, if any.
GetStyleChoice
(self)¶Returns the wx.Choice control used for selecting the style category.
Choice
GetStyleListBox
(self)¶Returns the wx.ListBox control used to view the style list.
GetStyleSheet
(self)¶Returns the associated style sheet, if any.
GetStyleType
(self)¶Returns the type of style to show in the list box.
wx.richtext.RichTextStyleListBox.wxRichTextStyleType
SetRichTextCtrl
(self, ctrl)¶Associates the control with a wx.richtext.RichTextCtrl.
ctrl (wx.richtext.RichTextCtrl) –
SetStyleSheet
(self, styleSheet)¶Associates the control with a style sheet.
styleSheet (wx.richtext.RichTextStyleSheet) –
SetStyleType
(self, styleType)¶Sets the style type to display.
One of
RichTextStyleListBox.__init__
,
RichTextStyleListBox.__init__
,
RichTextStyleListBox.__init__
RichTextStyleListBox.__init__
.
styleType (RichTextStyleListBox.wxRichTextStyleType) –
UpdateStyles
(self)¶Updates the style list box.
RichTextCtrl
¶See GetRichTextCtrl
and SetRichTextCtrl
StyleChoice
¶See GetStyleChoice
StyleListBox
¶See GetStyleListBox
StyleSheet
¶See GetStyleSheet
and SetStyleSheet
StyleType
¶See GetStyleType
and SetStyleType