phoenix_title wx.richtext.RichTextStyleSheet

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.


class_hierarchy Class Hierarchy

Inheritance diagram for class RichTextStyleSheet:

method_summary Methods Summary

__init__

Constructor.

AddCharacterStyle

Adds a definition to the character style list.

AddListStyle

Adds a definition to the list style list.

AddParagraphStyle

Adds a definition to the paragraph style list.

AddStyle

Adds a definition to the appropriate style list.

DeleteStyles

Deletes all styles.

FindCharacterStyle

Finds a character definition by name.

FindListStyle

Finds a list definition by name.

FindParagraphStyle

Finds a paragraph definition by name.

FindStyle

Finds a style definition by name.

GetCharacterStyle

Returns the nth character style.

GetCharacterStyleCount

Returns the number of character styles.

GetDescription

Returns the style sheet’s description.

GetListStyle

Returns the nth list style.

GetListStyleCount

Returns the number of list styles.

GetName

Returns the style sheet’s name.

GetParagraphStyle

Returns the nth paragraph style.

GetParagraphStyleCount

Returns the number of paragraph styles.

GetProperties

Returns the sheet’s properties.

RemoveCharacterStyle

Removes a character style.

RemoveListStyle

Removes a list style.

RemoveParagraphStyle

Removes a paragraph style.

RemoveStyle

Removes a style.

SetDescription

Sets the style sheet’s description.

SetName

Sets the style sheet’s name.

SetProperties

Sets the sheet’s properties.


property_summary Properties Summary

CharacterStyleCount

See GetCharacterStyleCount

Description

See GetDescription and SetDescription

ListStyleCount

See GetListStyleCount

Name

See GetName and SetName

ParagraphStyleCount

See GetParagraphStyleCount

Properties

See GetProperties and SetProperties


api Class API

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


Methods

__init__(self)

Constructor.



AddCharacterStyle(self, styleDef)

Adds a definition to the character style list.

Parameters:

styleDef (wx.richtext.RichTextCharacterStyleDefinition) –

Return type:

bool



AddListStyle(self, styleDef)

Adds a definition to the list style list.

Parameters:

styleDef (wx.richtext.RichTextListStyleDefinition) –

Return type:

bool



AddParagraphStyle(self, styleDef)

Adds a definition to the paragraph style list.

Parameters:

styleDef (wx.richtext.RichTextParagraphStyleDefinition) –

Return type:

bool



AddStyle(self, styleDef)

Adds a definition to the appropriate style list.

Parameters:

styleDef (wx.richtext.RichTextStyleDefinition) –

Return type:

bool



DeleteStyles(self)

Deletes all styles.



FindCharacterStyle(self, name, recurse=True)

Finds a character definition by name.

Parameters:
  • name (string) –

  • recurse (bool) –

Return type:

wx.richtext.RichTextCharacterStyleDefinition



FindListStyle(self, name, recurse=True)

Finds a list definition by name.

Parameters:
  • name (string) –

  • recurse (bool) –

Return type:

wx.richtext.RichTextListStyleDefinition



FindParagraphStyle(self, name, recurse=True)

Finds a paragraph definition by name.

Parameters:
  • name (string) –

  • recurse (bool) –

Return type:

wx.richtext.RichTextParagraphStyleDefinition



FindStyle(self, name)

Finds a style definition by name.

Parameters:

name (string) –

Return type:

wx.richtext.RichTextStyleDefinition



GetCharacterStyle(self, n)

Returns the nth character style.

Parameters:

n (int) –

Return type:

wx.richtext.RichTextCharacterStyleDefinition



GetCharacterStyleCount(self)

Returns the number of character styles.

Return type:

int



GetDescription(self)

Returns the style sheet’s description.

Return type:

string



GetListStyle(self, n)

Returns the nth list style.

Parameters:

n (int) –

Return type:

wx.richtext.RichTextListStyleDefinition



GetListStyleCount(self)

Returns the number of list styles.

Return type:

int



GetName(self)

Returns the style sheet’s name.

Return type:

string



GetParagraphStyle(self, n)

Returns the nth paragraph style.

Parameters:

n (int) –

Return type:

wx.richtext.RichTextParagraphStyleDefinition



GetParagraphStyleCount(self)

Returns the number of paragraph styles.

Return type:

int



GetProperties(self)

Returns the sheet’s properties.

Return type:

wx.richtext.RichTextProperties



RemoveCharacterStyle(self, styleDef, deleteStyle=False)

Removes a character style.

Parameters:
Return type:

bool



RemoveListStyle(self, styleDef, deleteStyle=False)

Removes a list style.

Parameters:
Return type:

bool



RemoveParagraphStyle(self, styleDef, deleteStyle=False)

Removes a paragraph style.

Parameters:
Return type:

bool



RemoveStyle(self, styleDef, deleteStyle=False)

Removes a style.

Parameters:
Return type:

bool



SetDescription(self, descr)

Sets the style sheet’s description.

Parameters:

descr (string) –



SetName(self, name)

Sets the style sheet’s name.

Parameters:

name (string) –



SetProperties(self, props)

Sets the sheet’s properties.

Parameters:

props (wx.richtext.RichTextProperties) –


Properties

CharacterStyleCount

See GetCharacterStyleCount



Description

See GetDescription and SetDescription



ListStyleCount

See GetListStyleCount



Name

See GetName and SetName



ParagraphStyleCount

See GetParagraphStyleCount



Properties

See GetProperties and SetProperties