Phoenix Logo

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

styles Window Styles

This class supports the following styles:

  • RICHTEXTSTYLELIST_HIDE_TYPE_SELECTOR: This style hides the category selection control.

class_hierarchy Class Hierarchy

Inheritance diagram for class RichTextStyleListCtrl:


method_summary Methods Summary

__init__ Constructors.
Create Creates the windows.
GetRichTextCtrl Returns the associated rich text control, if any.
GetStyleChoice Returns the wx.Choice control used for selecting the style category.
GetStyleListBox Returns the wx.ListBox control used to view the style list.
GetStyleSheet Returns the associated style sheet, if any.
GetStyleType Returns the type of style to show in the list box.
SetRichTextCtrl Associates the control with a wx.richtext.RichTextCtrl.
SetStyleSheet Associates the control with a style sheet.
SetStyleType Sets the style type to display.
UpdateStyles Updates the style list box.

api Class API



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


Methods



__init__(self, *args, **kw)

Constructors.

overload Overloaded Implementations:



__init__ (self, parent, id=ID_ANY, pos=DefaultPosition, size=DefaultSize, style=0)

Parameters:



__init__ (self)





Create(self, parent, id=ID_ANY, pos=DefaultPosition, size=DefaultSize, style=0)

Creates the windows.

Parameters:
Return type:

bool



GetRichTextCtrl(self)

Returns the associated rich text control, if any.

Return type: wx.richtext.RichTextCtrl


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


GetStyleSheet(self)

Returns the associated style sheet, if any.

Return type: wx.richtext.RichTextStyleSheet


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) –


SetStyleSheet(self, styleSheet)

Associates the control with a style sheet.

Parameters:styleSheet (wx.richtext.RichTextStyleSheet) –


SetStyleType(self, styleType)

Sets the style type to display.

One of

  • RichTextStyleListBox.__init__ ,
  • RichTextStyleListBox.__init__ ,
  • RichTextStyleListBox.__init__
  • RichTextStyleListBox.__init__ .
Parameters:styleType (RichTextStyleListBox.wxRichTextStyleType) –


UpdateStyles(self)

Updates the style list box.


Properties



RichTextCtrl

See GetRichTextCtrl and SetRichTextCtrl



StyleChoice

See GetStyleChoice



StyleListBox

See GetStyleListBox



StyleSheet

See GetStyleSheet and SetStyleSheet



StyleType

See GetStyleType and SetStyleType