A style sheet contains named paragraph and character styles that make it easy for a user to apply combinations of attributes to a wx.richtext.RichTextCtrl.
You can use a wx.richtext.RichTextStyleListBox in your user interface to show available styles to the user, and allow application of styles to the control.
Constructor. |
|
Adds a definition to the character style list. |
|
Adds a definition to the list style list. |
|
Adds a definition to the paragraph style list. |
|
Adds a definition to the appropriate style list. |
|
Deletes all styles. |
|
Finds a character definition by name. |
|
Finds a list definition by name. |
|
Finds a paragraph definition by name. |
|
Finds a style definition by name. |
|
Returns the nth character style. |
|
Returns the number of character styles. |
|
Returns the style sheet’s description. |
|
Returns the nth list style. |
|
Returns the number of list styles. |
|
Returns the style sheet’s name. |
|
Returns the nth paragraph style. |
|
Returns the number of paragraph styles. |
|
Returns the sheet’s properties. |
|
Removes a character style. |
|
Removes a list style. |
|
Removes a paragraph style. |
|
Removes a style. |
|
Sets the style sheet’s description. |
|
Sets the style sheet’s name. |
|
Sets the sheet’s properties. |
See |
|
See |
wx.richtext.
RichTextStyleSheet
(Object)¶Possible constructors:
RichTextStyleSheet()
A style sheet contains named paragraph and character styles that make it easy for a user to apply combinations of attributes to a RichTextCtrl.
__init__
(self)¶Constructor.
AddCharacterStyle
(self, styleDef)¶Adds a definition to the character style list.
styleDef (wx.richtext.RichTextCharacterStyleDefinition) –
bool
AddListStyle
(self, styleDef)¶Adds a definition to the list style list.
styleDef (wx.richtext.RichTextListStyleDefinition) –
bool
AddParagraphStyle
(self, styleDef)¶Adds a definition to the paragraph style list.
styleDef (wx.richtext.RichTextParagraphStyleDefinition) –
bool
AddStyle
(self, styleDef)¶Adds a definition to the appropriate style list.
styleDef (wx.richtext.RichTextStyleDefinition) –
bool
DeleteStyles
(self)¶Deletes all styles.
FindCharacterStyle
(self, name, recurse=True)¶Finds a character definition by name.
name (string) –
recurse (bool) –
FindListStyle
(self, name, recurse=True)¶Finds a list definition by name.
name (string) –
recurse (bool) –
FindParagraphStyle
(self, name, recurse=True)¶Finds a paragraph definition by name.
name (string) –
recurse (bool) –
FindStyle
(self, name)¶Finds a style definition by name.
name (string) –
GetCharacterStyle
(self, n)¶Returns the nth character style.
n (int) –
GetCharacterStyleCount
(self)¶Returns the number of character styles.
int
GetDescription
(self)¶Returns the style sheet’s description.
string
GetListStyle
(self, n)¶Returns the nth list style.
n (int) –
GetListStyleCount
(self)¶Returns the number of list styles.
int
GetName
(self)¶Returns the style sheet’s name.
string
GetParagraphStyle
(self, n)¶Returns the nth paragraph style.
n (int) –
GetParagraphStyleCount
(self)¶Returns the number of paragraph styles.
int
GetProperties
(self)¶Returns the sheet’s properties.
RemoveCharacterStyle
(self, styleDef, deleteStyle=False)¶Removes a character style.
styleDef (wx.richtext.RichTextStyleDefinition) –
deleteStyle (bool) –
bool
RemoveListStyle
(self, styleDef, deleteStyle=False)¶Removes a list style.
styleDef (wx.richtext.RichTextStyleDefinition) –
deleteStyle (bool) –
bool
RemoveParagraphStyle
(self, styleDef, deleteStyle=False)¶Removes a paragraph style.
styleDef (wx.richtext.RichTextStyleDefinition) –
deleteStyle (bool) –
bool
RemoveStyle
(self, styleDef, deleteStyle=False)¶Removes a style.
styleDef (wx.richtext.RichTextStyleDefinition) –
deleteStyle (bool) –
bool
SetDescription
(self, descr)¶Sets the style sheet’s description.
descr (string) –
SetName
(self, name)¶Sets the style sheet’s name.
name (string) –
SetProperties
(self, props)¶Sets the sheet’s properties.
props (wx.richtext.RichTextProperties) –
CharacterStyleCount
¶Description
¶See GetDescription
and SetDescription
ListStyleCount
¶ParagraphStyleCount
¶Properties
¶See GetProperties
and SetProperties