phoenix_title wx.richtext.RichTextEvent

This is the event class for wx.richtext.RichTextCtrl notifications.

^^

events Events Emitted by this Class

Handlers bound for the following event types will receive a wx.richtext.RichTextEvent parameter.

  • EVT_RICHTEXT_LEFT_CLICK: Process a wxEVT_RICHTEXT_LEFT_CLICK event, generated when the user releases the left mouse button over an object.

  • EVT_RICHTEXT_RIGHT_CLICK: Process a wxEVT_RICHTEXT_RIGHT_CLICK event, generated when the user releases the right mouse button over an object.

  • EVT_RICHTEXT_MIDDLE_CLICK: Process a wxEVT_RICHTEXT_MIDDLE_CLICK event, generated when the user releases the middle mouse button over an object.

  • EVT_RICHTEXT_LEFT_DCLICK: Process a wxEVT_RICHTEXT_LEFT_DCLICK event, generated when the user double-clicks an object.

  • EVT_RICHTEXT_RETURN: Process a wxEVT_RICHTEXT_RETURN event, generated when the user presses the return key. Valid event functions: GetFlags, GetPosition.

  • EVT_RICHTEXT_CHARACTER: Process a wxEVT_RICHTEXT_CHARACTER event, generated when the user presses a character key. Valid event functions: GetFlags, GetPosition, GetCharacter.

  • EVT_RICHTEXT_CONSUMING_CHARACTER: Process a wxEVT_RICHTEXT_CONSUMING_CHARACTER event, generated when the user presses a character key but before it is processed and inserted into the control. Call Veto to prevent normal processing. Valid event functions: GetFlags, GetPosition, GetCharacter, Veto.

  • EVT_RICHTEXT_DELETE: Process a wxEVT_RICHTEXT_DELETE event, generated when the user presses the backspace or delete key. Valid event functions: GetFlags, GetPosition.

  • EVT_RICHTEXT_RETURN: Process a wxEVT_RICHTEXT_RETURN event, generated when the user presses the return key. Valid event functions: GetFlags, GetPosition.

  • EVT_RICHTEXT_STYLE_CHANGED: Process a wxEVT_RICHTEXT_STYLE_CHANGED event, generated when styling has been applied to the control. Valid event functions: GetPosition, GetRange.

  • EVT_RICHTEXT_STYLESHEET_CHANGED: Process a wxEVT_RICHTEXT_STYLESHEET_CHANGING event, generated when the control’s stylesheet has changed, for example the user added, edited or deleted a style. Valid event functions: GetRange, GetPosition.

  • EVT_RICHTEXT_STYLESHEET_REPLACING: Process a wxEVT_RICHTEXT_STYLESHEET_REPLACING event, generated when the control’s stylesheet is about to be replaced, for example when a file is loaded into the control. Valid event functions: Veto, GetOldStyleSheet, GetNewStyleSheet.

  • EVT_RICHTEXT_STYLESHEET_REPLACED: Process a wxEVT_RICHTEXT_STYLESHEET_REPLACED event, generated when the control’s stylesheet has been replaced, for example when a file is loaded into the control. Valid event functions: GetOldStyleSheet, GetNewStyleSheet.

  • EVT_RICHTEXT_PROPERTIES_CHANGED: Process a wxEVT_RICHTEXT_PROPERTIES_CHANGED event, generated when properties have been applied to the control. Valid event functions: GetPosition, GetRange.

  • EVT_RICHTEXT_CONTENT_INSERTED: Process a wxEVT_RICHTEXT_CONTENT_INSERTED event, generated when content has been inserted into the control. Valid event functions: GetPosition, GetRange.

  • EVT_RICHTEXT_CONTENT_DELETED: Process a wxEVT_RICHTEXT_CONTENT_DELETED event, generated when content has been deleted from the control. Valid event functions: GetPosition, GetRange.

  • EVT_RICHTEXT_BUFFER_RESET: Process a wxEVT_RICHTEXT_BUFFER_RESET event, generated when the buffer has been reset by deleting all content. You can use this to set a default style for the first new paragraph.

  • EVT_RICHTEXT_SELECTION_CHANGED: Process a wxEVT_RICHTEXT_SELECTION_CHANGED event, generated when the selection range has changed.

  • EVT_RICHTEXT_FOCUS_OBJECT_CHANGED: Process a wxEVT_RICHTEXT_FOCUS_OBJECT_CHANGED event, generated when the current focus object has changed. ^^


class_hierarchy Class Hierarchy

Inheritance diagram for class RichTextEvent:

method_summary Methods Summary

__init__

Constructor.

Clone

Returns a copy of the event.

GetCharacter

Returns the character pressed, within a wxEVT_RICHTEXT_CHARACTER event.

GetContainer

Returns the container for which the event is relevant.

GetFlags

Returns flags indicating modifier keys pressed.

GetNewStyleSheet

Returns the new style sheet.

GetOldContainer

Returns the old container, for a focus change event.

GetOldStyleSheet

Returns the old style sheet.

GetPosition

Returns the buffer position at which the event occurred.

GetRange

Gets the range for the current operation.

SetCharacter

Sets the character variable.

SetContainer

Sets the container for which the event is relevant.

SetFlags

Sets flags indicating modifier keys pressed.

SetNewStyleSheet

Sets the new style sheet variable.

SetOldContainer

Sets the old container, for a focus change event.

SetOldStyleSheet

Sets the old style sheet variable.

SetPosition

Sets the buffer position variable.

SetRange

Sets the range variable.


api Class API

class wx.richtext.RichTextEvent(NotifyEvent)

Possible constructors:

RichTextEvent(commandType=wxEVT_NULL, winid=0)

RichTextEvent(event)

This is the event class for RichTextCtrl notifications.


Methods

__init__(self, *args, **kw)

overload Overloaded Implementations:



__init__ (self, commandType=wxEVT_NULL, winid=0)

Constructor.

Parameters
  • commandType (wx.EventType) – The type of the event.

  • winid (int) – Window identifier. The value ID_ANY indicates a default value.



__init__ (self, event)

Copy constructor.

Parameters

event (wx.richtext.RichTextEvent) –





Clone(self)

Returns a copy of the event.

Any event that is posted to the wxWidgets event system for later action (via wx.EvtHandler.AddPendingEvent , wx.EvtHandler.QueueEvent or wx.PostEvent ) must implement this method.

All wxWidgets events fully implement this method, but any derived events implemented by the user should also implement this method just in case they (or some event derived from them) are ever posted.

All wxWidgets events implement a copy constructor, so the easiest way of implementing the Clone function is to implement a copy constructor for a new event (call it MyEvent) and then define the Clone function like this:

def Clone(self):

    return MyEvent()
Return type

Event



GetCharacter(self)

Returns the character pressed, within a wxEVT_RICHTEXT_CHARACTER event.

Return type

wx.Char



GetContainer(self)

Returns the container for which the event is relevant.

Return type

wx.richtext.RichTextParagraphLayoutBox



GetFlags(self)

Returns flags indicating modifier keys pressed.

Possible values are RICHTEXT_CTRL_DOWN , RICHTEXT_SHIFT_DOWN , and RICHTEXT_ALT_DOWN .

Return type

int



GetNewStyleSheet(self)

Returns the new style sheet.

Can be used in a wxEVT_RICHTEXT_STYLESHEET_CHANGING or wxEVT_RICHTEXT_STYLESHEET_CHANGED event handler.

Return type

wx.richtext.RichTextStyleSheet



GetOldContainer(self)

Returns the old container, for a focus change event.

Return type

wx.richtext.RichTextParagraphLayoutBox



GetOldStyleSheet(self)

Returns the old style sheet.

Can be used in a wxEVT_RICHTEXT_STYLESHEET_CHANGING or wxEVT_RICHTEXT_STYLESHEET_CHANGED event handler.

Return type

wx.richtext.RichTextStyleSheet



GetPosition(self)

Returns the buffer position at which the event occurred.

Return type

long



GetRange(self)

Gets the range for the current operation.

Return type

wx.richtext.RichTextRange



SetCharacter(self, ch)

Sets the character variable.

Parameters

ch (wx.Char) –



SetContainer(self, container)

Sets the container for which the event is relevant.

Parameters

container (wx.richtext.RichTextParagraphLayoutBox) –



SetFlags(self, flags)

Sets flags indicating modifier keys pressed.

Possible values are RICHTEXT_CTRL_DOWN , RICHTEXT_SHIFT_DOWN , and RICHTEXT_ALT_DOWN .

Parameters

flags (int) –



SetNewStyleSheet(self, sheet)

Sets the new style sheet variable.

Parameters

sheet (wx.richtext.RichTextStyleSheet) –



SetOldContainer(self, container)

Sets the old container, for a focus change event.

Parameters

container (wx.richtext.RichTextParagraphLayoutBox) –



SetOldStyleSheet(self, sheet)

Sets the old style sheet variable.

Parameters

sheet (wx.richtext.RichTextStyleSheet) –



SetPosition(self, pos)

Sets the buffer position variable.

Parameters

pos (long) –



SetRange(self, range)

Sets the range variable.

Parameters

range (wx.richtext.RichTextRange) –


Properties

Character

See GetCharacter and SetCharacter



Container

See GetContainer and SetContainer



Flags

See GetFlags and SetFlags



NewStyleSheet

See GetNewStyleSheet and SetNewStyleSheet



OldContainer

See GetOldContainer and SetOldContainer



OldStyleSheet

See GetOldStyleSheet and SetOldStyleSheet



Position

See GetPosition and SetPosition



Range

See GetRange and SetRange