.. wxPython Phoenix documentation This file was generated by Phoenix's sphinx generator and associated tools, do not edit by hand. Copyright: (c) 2011-2020 by Total Control Software License: wxWindows License .. include:: headings.inc .. _wx.richtext.RichTextCtrl: ========================================================================================================================================== |phoenix_title| **wx.richtext.RichTextCtrl** ========================================================================================================================================== :ref:`wx.richtext.RichTextCtrl` provides a generic, ground-up implementation of a text control capable of showing multiple styles and images. :ref:`wx.richtext.RichTextCtrl` sends notification events: see :ref:`wx.richtext.RichTextEvent`. It also sends the standard :ref:`wx.TextCtrl` events ``wxEVT_TEXT_ENTER`` and ``wxEVT_TEXT`` , and :ref:`wx.TextUrlEvent` when URL content is clicked. For more information, see the :ref:`RichTextCtrl Overview `. ^^ .. _RichTextCtrl-styles: |styles| Window Styles ================================ This class supports the following styles: - ``wx.richtext.RE_CENTRE_CARET``: The control will try to keep the caret line centred vertically while editing. ``wx.richtext.RE_CENTER_CARET`` is a synonym for this style. - ``wx.richtext.RE_MULTILINE``: The control will be multiline (mandatory). - ``wx.richtext.RE_READONLY``: The control will not be editable. ^^ | |class_hierarchy| Class Hierarchy ================================= .. raw:: html
Inheritance diagram for class RichTextCtrl:
| |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~wx.richtext.RichTextCtrl.__init__` Default constructor. :meth:`~wx.richtext.RichTextCtrl.AddImage` Adds an image to the control's buffer. :meth:`~wx.richtext.RichTextCtrl.AddParagraph` Adds a new paragraph of text to the end of the buffer. :meth:`~wx.richtext.RichTextCtrl.AppendText` Sets the insertion point to the end of the buffer and writes the text. :meth:`~wx.richtext.RichTextCtrl.ApplyAlignmentToSelection` Applies the given alignment to the selection or the default style (undoable). :meth:`~wx.richtext.RichTextCtrl.ApplyBoldToSelection` Apples bold to the selection or the default style (undoable). :meth:`~wx.richtext.RichTextCtrl.ApplyItalicToSelection` Applies italic to the selection or the default style (undoable). :meth:`~wx.richtext.RichTextCtrl.ApplyStyle` Applies the style sheet to the buffer, matching paragraph styles in the sheet against named styles in the buffer. :meth:`~wx.richtext.RichTextCtrl.ApplyStyleSheet` Applies the style sheet to the buffer, for example if the styles have changed. :meth:`~wx.richtext.RichTextCtrl.ApplyTextEffectToSelection` Applies one or more TextAttrEffects flags to the selection (undoable). :meth:`~wx.richtext.RichTextCtrl.ApplyUnderlineToSelection` Applies underline to the selection or the default style (undoable). :meth:`~wx.richtext.RichTextCtrl.AutoComplete` Call this function to enable auto-completion of the text typed in a single-line text control using the given `choices`. :meth:`~wx.richtext.RichTextCtrl.AutoCompleteDirectories` Call this function to enable auto-completion of the text using the file system directories. :meth:`~wx.richtext.RichTextCtrl.AutoCompleteFileNames` Call this function to enable auto-completion of the text typed in a single-line text control using all valid file system paths. :meth:`~wx.richtext.RichTextCtrl.BatchingUndo` Returns ``True`` if undo commands are being batched. :meth:`~wx.richtext.RichTextCtrl.BeginAlignment` Begins using alignment. :meth:`~wx.richtext.RichTextCtrl.BeginBatchUndo` Starts batching undo history for commands. :meth:`~wx.richtext.RichTextCtrl.BeginBold` Begins using bold. :meth:`~wx.richtext.RichTextCtrl.BeginCharacterStyle` Begins using the named character style. :meth:`~wx.richtext.RichTextCtrl.BeginFont` Begins using this font. :meth:`~wx.richtext.RichTextCtrl.BeginFontSize` Begins using the given point size. :meth:`~wx.richtext.RichTextCtrl.BeginItalic` Begins using italic. :meth:`~wx.richtext.RichTextCtrl.BeginLeftIndent` Begins applying a left indent and subindent in tenths of a millimetre. :meth:`~wx.richtext.RichTextCtrl.BeginLineSpacing` Begins applying line spacing. :meth:`~wx.richtext.RichTextCtrl.BeginListStyle` Begins using a specified list style. :meth:`~wx.richtext.RichTextCtrl.BeginNumberedBullet` Begins a numbered bullet. :meth:`~wx.richtext.RichTextCtrl.BeginParagraphSpacing` Begins paragraph spacing; pass the before-paragraph and after-paragraph spacing in tenths of a millimetre. :meth:`~wx.richtext.RichTextCtrl.BeginParagraphStyle` Begins applying the named paragraph style. :meth:`~wx.richtext.RichTextCtrl.BeginRightIndent` Begins a right indent, specified in tenths of a millimetre. :meth:`~wx.richtext.RichTextCtrl.BeginStandardBullet` Begins applying a symbol bullet. :meth:`~wx.richtext.RichTextCtrl.BeginStyle` Begins applying a style. :meth:`~wx.richtext.RichTextCtrl.BeginSuppressUndo` Starts suppressing undo history for commands. :meth:`~wx.richtext.RichTextCtrl.BeginSymbolBullet` Begins applying a symbol bullet, using a character from the current font. :meth:`~wx.richtext.RichTextCtrl.BeginTextColour` Begins using this colour. :meth:`~wx.richtext.RichTextCtrl.BeginURL` Begins applying ``wx.TEXT_ATTR_URL`` to the content. :meth:`~wx.richtext.RichTextCtrl.BeginUnderline` Begins using underlining. :meth:`~wx.richtext.RichTextCtrl.CanCopy` Returns ``True`` if selected content can be copied to the clipboard. :meth:`~wx.richtext.RichTextCtrl.CanCut` Returns ``True`` if selected content can be copied to the clipboard and deleted. :meth:`~wx.richtext.RichTextCtrl.CanDeleteRange` Can we delete this range? Sends an event to the control. :meth:`~wx.richtext.RichTextCtrl.CanDeleteSelection` Returns ``True`` if selected content can be deleted. :meth:`~wx.richtext.RichTextCtrl.CanEditProperties` Returns ``True`` if we can edit the object's properties via a GUI. :meth:`~wx.richtext.RichTextCtrl.CanInsertContent` Can we insert content at this position? Sends an event to the control. :meth:`~wx.richtext.RichTextCtrl.CanPaste` Returns ``True`` if the clipboard content can be pasted to the buffer. :meth:`~wx.richtext.RichTextCtrl.CanRedo` Returns ``True`` if there is a command in the command history that can be redone. :meth:`~wx.richtext.RichTextCtrl.CanUndo` Returns ``True`` if there is a command in the command history that can be undone. :meth:`~wx.richtext.RichTextCtrl.ChangeValue` Sets the new text control value. :meth:`~wx.richtext.RichTextCtrl.Clear` Clears the buffer content, leaving a single empty paragraph. :meth:`~wx.richtext.RichTextCtrl.ClearAvailableFontNames` Clears the cache of available font names. :meth:`~wx.richtext.RichTextCtrl.ClearListStyle` Clears the list style from the given range, clearing list-related attributes and applying any named paragraph style associated with each paragraph. :meth:`~wx.richtext.RichTextCtrl.Command` Sends the event to the control. :meth:`~wx.richtext.RichTextCtrl.Copy` Copies the selected content (if any) to the clipboard. :meth:`~wx.richtext.RichTextCtrl.Create` Creates the underlying window. :meth:`~wx.richtext.RichTextCtrl.Cut` Copies the selected content (if any) to the clipboard and deletes the selection. :meth:`~wx.richtext.RichTextCtrl.Delete` Deletes the content within the given range. :meth:`~wx.richtext.RichTextCtrl.DeleteSelectedContent` Deletes content if there is a selection, e.g. :meth:`~wx.richtext.RichTextCtrl.DeleteSelection` Deletes the content in the selection, if any. :meth:`~wx.richtext.RichTextCtrl.DiscardEdits` Sets the buffer's modified status to ``False``, and clears the buffer's command history. :meth:`~wx.richtext.RichTextCtrl.DoGetBestSize` Currently this simply returns :ref:`wx.Size`. :meth:`~wx.richtext.RichTextCtrl.DoGetValue` :meth:`~wx.richtext.RichTextCtrl.DoLayoutBuffer` Implements layout. :meth:`~wx.richtext.RichTextCtrl.DoLoadFile` Helper function for :meth:`~RichTextCtrl.LoadFile` . :meth:`~wx.richtext.RichTextCtrl.DoSaveFile` Helper function for :meth:`~RichTextCtrl.SaveFile` . :meth:`~wx.richtext.RichTextCtrl.DoThaw` :meth:`~wx.richtext.RichTextCtrl.DoWriteText` :meth:`~wx.richtext.RichTextCtrl.DoesSelectionHaveTextEffectFlag` Returns ``True`` if all of the selection, or the content at the current caret position, has the supplied TextAttrEffects flag(s). :meth:`~wx.richtext.RichTextCtrl.EditProperties` Edits the object's properties via a GUI. :meth:`~wx.richtext.RichTextCtrl.EnableDelayedImageLoading` Enable or disable delayed image loading. :meth:`~wx.richtext.RichTextCtrl.EnableImages` Enable or disable images. :meth:`~wx.richtext.RichTextCtrl.EnableVerticalScrollbar` Enable or disable the vertical scrollbar. :meth:`~wx.richtext.RichTextCtrl.EnableVirtualAttributes` Pass ``True`` to let the control use virtual attributes. :meth:`~wx.richtext.RichTextCtrl.EndAlignment` Ends alignment. :meth:`~wx.richtext.RichTextCtrl.EndAllStyles` Ends application of all styles in the current style stack. :meth:`~wx.richtext.RichTextCtrl.EndBatchUndo` Ends batching undo command history. :meth:`~wx.richtext.RichTextCtrl.EndBold` Ends using bold. :meth:`~wx.richtext.RichTextCtrl.EndCharacterStyle` Ends application of a named character style. :meth:`~wx.richtext.RichTextCtrl.EndFont` Ends using a font. :meth:`~wx.richtext.RichTextCtrl.EndFontSize` Ends using a point size. :meth:`~wx.richtext.RichTextCtrl.EndItalic` Ends using italic. :meth:`~wx.richtext.RichTextCtrl.EndLeftIndent` Ends left indent. :meth:`~wx.richtext.RichTextCtrl.EndLineSpacing` Ends line spacing. :meth:`~wx.richtext.RichTextCtrl.EndListStyle` Ends using a specified list style. :meth:`~wx.richtext.RichTextCtrl.EndNumberedBullet` Ends application of a numbered bullet. :meth:`~wx.richtext.RichTextCtrl.EndParagraphSpacing` Ends paragraph spacing. :meth:`~wx.richtext.RichTextCtrl.EndParagraphStyle` Ends application of a named paragraph style. :meth:`~wx.richtext.RichTextCtrl.EndRightIndent` Ends right indent. :meth:`~wx.richtext.RichTextCtrl.EndStandardBullet` Begins applying a standard bullet. :meth:`~wx.richtext.RichTextCtrl.EndStyle` Ends the current style. :meth:`~wx.richtext.RichTextCtrl.EndSuppressUndo` Ends suppressing undo command history. :meth:`~wx.richtext.RichTextCtrl.EndSymbolBullet` Ends applying a symbol bullet. :meth:`~wx.richtext.RichTextCtrl.EndTextColour` Ends applying a text colour. :meth:`~wx.richtext.RichTextCtrl.EndURL` Ends applying a URL. :meth:`~wx.richtext.RichTextCtrl.EndUnderline` End applying underlining. :meth:`~wx.richtext.RichTextCtrl.ExtendCellSelection` Extends a table selection in the given direction. :meth:`~wx.richtext.RichTextCtrl.ExtendSelection` Helper function for extending the selection, returning ``True`` if the selection was changed. :meth:`~wx.richtext.RichTextCtrl.FindCaretPositionForCharacterPosition` Find the caret position for the combination of hit-test flags and character position. :meth:`~wx.richtext.RichTextCtrl.FindContainerAtPoint` Finds the container at the given point, which is assumed to be in client coordinates. :meth:`~wx.richtext.RichTextCtrl.FindNextWordPosition` Helper function for finding the caret position for the next word. :meth:`~wx.richtext.RichTextCtrl.FindRangeForList` Given a character position at which there is a list style, find the range encompassing the same list style by looking backwards and forwards. :meth:`~wx.richtext.RichTextCtrl.ForceDelayedLayout` :meth:`~wx.richtext.RichTextCtrl.ForceUpper` Convert all text entered into the control to upper case. :meth:`~wx.richtext.RichTextCtrl.GetAdjustedCaretPosition` The adjusted caret position is the character position adjusted to take into account whether we're at the start of a paragraph, in which case style information should be taken from the next position, not current one. :meth:`~wx.richtext.RichTextCtrl.GetAvailableFontNames` Font names take a long time to retrieve, so cache them (on demand). :meth:`~wx.richtext.RichTextCtrl.GetBasicStyle` Gets the basic (overall) style. :meth:`~wx.richtext.RichTextCtrl.GetBuffer` Returns the buffer associated with the control. :meth:`~wx.richtext.RichTextCtrl.GetCaretAtLineStart` Returns ``True`` if we are showing the caret position at the start of a line instead of at the end of the previous one. :meth:`~wx.richtext.RichTextCtrl.GetCaretPosition` Returns the current caret position. :meth:`~wx.richtext.RichTextCtrl.GetCaretPositionForDefaultStyle` Returns the caret position since the default formatting was changed. :meth:`~wx.richtext.RichTextCtrl.GetCaretPositionForIndex` Returns the caret height and position for the given character position. :meth:`~wx.richtext.RichTextCtrl.GetClassDefaultAttributes` :meth:`~wx.richtext.RichTextCtrl.GetCommandProcessor` Gets the command processor associated with the control's buffer. :meth:`~wx.richtext.RichTextCtrl.GetContextMenu` Returns the current context menu. :meth:`~wx.richtext.RichTextCtrl.GetContextMenuPropertiesInfo` Returns an object that stores information about context menu property item(s), in order to communicate between the context menu event handler and the code that responds to it. :meth:`~wx.richtext.RichTextCtrl.GetDefaultStyleEx` Returns the current default style, which can be used to change how subsequently inserted text is displayed. :meth:`~wx.richtext.RichTextCtrl.GetDelayedImageLoading` Returns ``True`` if delayed image loading is enabled. :meth:`~wx.richtext.RichTextCtrl.GetDelayedImageProcessingRequired` Gets the flag indicating that delayed image processing is required. :meth:`~wx.richtext.RichTextCtrl.GetDelayedImageProcessingTime` Returns the last time delayed image processing was performed. :meth:`~wx.richtext.RichTextCtrl.GetDelayedLayoutThreshold` Gets the size of the buffer beyond which layout is delayed during resizing. :meth:`~wx.richtext.RichTextCtrl.GetDimensionScale` Returns the scale factor for displaying certain dimensions such as indentation and inter-paragraph spacing. :meth:`~wx.richtext.RichTextCtrl.GetDragStartPoint` Get the possible Drag'n'Drop start point. :meth:`~wx.richtext.RichTextCtrl.GetDragStartTime` Get the possible Drag'n'Drop start time. :meth:`~wx.richtext.RichTextCtrl.GetDragging` Returns ``True`` if we are extending a selection. :meth:`~wx.richtext.RichTextCtrl.GetFilename` Gets the current filename associated with the control. :meth:`~wx.richtext.RichTextCtrl.GetFirstVisiblePoint` Returns the first visible point in the window. :meth:`~wx.richtext.RichTextCtrl.GetFirstVisiblePosition` Returns the first visible position in the current view. :meth:`~wx.richtext.RichTextCtrl.GetFocusObject` Returns the :ref:`wx.richtext.RichTextObject` object that currently has the editing focus. :meth:`~wx.richtext.RichTextCtrl.GetFontScale` Returns the scale factor for displaying fonts, for example for more comfortable editing. :meth:`~wx.richtext.RichTextCtrl.GetFullLayoutRequired` :meth:`~wx.richtext.RichTextCtrl.GetFullLayoutSavedPosition` :meth:`~wx.richtext.RichTextCtrl.GetFullLayoutTime` :meth:`~wx.richtext.RichTextCtrl.GetHandlerFlags` Returns flags that change the behaviour of loading or saving. :meth:`~wx.richtext.RichTextCtrl.GetHint` Returns the current hint string. :meth:`~wx.richtext.RichTextCtrl.GetImagesEnabled` Returns ``True`` if images are enabled. :meth:`~wx.richtext.RichTextCtrl.GetInsertionPoint` Returns the current insertion point. :meth:`~wx.richtext.RichTextCtrl.GetInternalSelectionRange` Returns the selection range in character positions. :meth:`~wx.richtext.RichTextCtrl.GetLastPosition` Returns the last position in the buffer. :meth:`~wx.richtext.RichTextCtrl.GetLineLength` Returns the length of the specified line in characters. :meth:`~wx.richtext.RichTextCtrl.GetLineText` Returns the text for the given line. :meth:`~wx.richtext.RichTextCtrl.GetLogicalPoint` Transforms physical window position to logical (unscrolled) position. :meth:`~wx.richtext.RichTextCtrl.GetMargins` Returns the margins used by the control. :meth:`~wx.richtext.RichTextCtrl.GetNumberOfLines` Returns the number of lines in the buffer. :meth:`~wx.richtext.RichTextCtrl.GetPhysicalPoint` Transforms logical (unscrolled) position to physical window position. :meth:`~wx.richtext.RichTextCtrl.GetPreDrag` Are we trying to start Drag'n'Drop? :meth:`~wx.richtext.RichTextCtrl.GetPropertiesMenuLabel` Gets the object's properties menu label. :meth:`~wx.richtext.RichTextCtrl.GetRange` Gets the text for the given range. :meth:`~wx.richtext.RichTextCtrl.GetScale` Returns an overall scale factor for displaying and editing the content. :meth:`~wx.richtext.RichTextCtrl.GetScaledPoint` Returns a scaled point. :meth:`~wx.richtext.RichTextCtrl.GetScaledRect` Returns a scaled rectangle. :meth:`~wx.richtext.RichTextCtrl.GetScaledSize` Returns a scaled size. :meth:`~wx.richtext.RichTextCtrl.GetSelection` Returns the range of the current selection. :meth:`~wx.richtext.RichTextCtrl.GetSelectionAnchor` Returns an anchor so we know how to extend the selection. :meth:`~wx.richtext.RichTextCtrl.GetSelectionAnchorObject` Returns the anchor object if selecting multiple containers. :meth:`~wx.richtext.RichTextCtrl.GetSelectionRange` Returns the selection range in character positions. :meth:`~wx.richtext.RichTextCtrl.GetStringSelection` Returns the text within the current selection range, if any. :meth:`~wx.richtext.RichTextCtrl.GetStyle` Gets the attributes at the given position. :meth:`~wx.richtext.RichTextCtrl.GetStyleForRange` Gets the attributes common to the specified range. :meth:`~wx.richtext.RichTextCtrl.GetStyleSheet` Returns the style sheet associated with the control, if any. :meth:`~wx.richtext.RichTextCtrl.GetTextCursor` Returns the text (normal) cursor. :meth:`~wx.richtext.RichTextCtrl.GetURLCursor` Returns the cursor to be used over URLs. :meth:`~wx.richtext.RichTextCtrl.GetUncombinedStyle` Gets the attributes at the given position. :meth:`~wx.richtext.RichTextCtrl.GetUnscaledPoint` Returns an unscaled point. :meth:`~wx.richtext.RichTextCtrl.GetUnscaledRect` Returns an unscaled rectangle. :meth:`~wx.richtext.RichTextCtrl.GetUnscaledSize` Returns an unscaled size. :meth:`~wx.richtext.RichTextCtrl.GetValue` Returns the content of the entire control as a string. :meth:`~wx.richtext.RichTextCtrl.GetVerticalScrollbarEnabled` Returns ``True`` if the vertical scrollbar is enabled. :meth:`~wx.richtext.RichTextCtrl.GetVirtualAttributesEnabled` Returns ``True`` if this control can use virtual attributes and virtual text. :meth:`~wx.richtext.RichTextCtrl.GetVisibleLineForCaretPosition` Internal helper function returning the line for the visible caret position. :meth:`~wx.richtext.RichTextCtrl.HasCharacterAttributes` Test if this whole range has character attributes of the specified kind. :meth:`~wx.richtext.RichTextCtrl.HasParagraphAttributes` Test if this whole range has paragraph attributes of the specified kind. :meth:`~wx.richtext.RichTextCtrl.HasSelection` Returns ``True`` if there is a selection and the object containing the selection was the same as the current focus object. :meth:`~wx.richtext.RichTextCtrl.HasUnfocusedSelection` Returns ``True`` if there was a selection, whether or not the current focus object is the same as the selection's container object. :meth:`~wx.richtext.RichTextCtrl.HitTest` Finds the character at the given position in pixels. :meth:`~wx.richtext.RichTextCtrl.HitTestXY` Finds the character at the given position in pixels. :meth:`~wx.richtext.RichTextCtrl.Init` Initialises the members of the control. :meth:`~wx.richtext.RichTextCtrl.Invalidate` Invalidates the whole buffer to trigger painting later. :meth:`~wx.richtext.RichTextCtrl.IsDefaultStyleShowing` Returns ``True`` if the user has recently set the default style without moving the caret, and therefore the UI needs to reflect the default style and not the style at the caret. :meth:`~wx.richtext.RichTextCtrl.IsEditable` Returns ``True`` if the control is editable. :meth:`~wx.richtext.RichTextCtrl.IsEmpty` Returns ``True`` if the control is currently empty. :meth:`~wx.richtext.RichTextCtrl.IsModified` Returns ``True`` if the buffer has been modified. :meth:`~wx.richtext.RichTextCtrl.IsMultiLine` Returns ``True`` if the control is multiline. :meth:`~wx.richtext.RichTextCtrl.IsPositionVisible` Returns ``True`` if the given position is visible on the screen. :meth:`~wx.richtext.RichTextCtrl.IsSelectionAligned` Returns ``True`` if all of the selection is aligned according to the specified flag. :meth:`~wx.richtext.RichTextCtrl.IsSelectionBold` Returns ``True`` if all of the selection, or the content at the caret position, is bold. :meth:`~wx.richtext.RichTextCtrl.IsSelectionItalics` Returns ``True`` if all of the selection, or the content at the caret position, is italic. :meth:`~wx.richtext.RichTextCtrl.IsSelectionUnderlined` Returns ``True`` if all of the selection, or the content at the caret position, is underlined. :meth:`~wx.richtext.RichTextCtrl.IsSingleLine` Returns ``True`` if the control is single-line. :meth:`~wx.richtext.RichTextCtrl.KeyboardNavigate` Helper function implementing keyboard navigation. :meth:`~wx.richtext.RichTextCtrl.LayoutContent` Lays out the buffer, which must be done before certain operations, such as setting the caret position. :meth:`~wx.richtext.RichTextCtrl.LineBreak` Inserts a line break at the current insertion point. :meth:`~wx.richtext.RichTextCtrl.LoadFile` Loads content into the control's buffer using the given type. :meth:`~wx.richtext.RichTextCtrl.MarkDirty` Marks the buffer as modified. :meth:`~wx.richtext.RichTextCtrl.MoveCaret` Move the caret to the given character position. :meth:`~wx.richtext.RichTextCtrl.MoveCaretBack` Move the caret one visual step forward: this may mean setting a flag and keeping the same position if we're going from the end of one line to the start of the next, which may be the exact same caret position. :meth:`~wx.richtext.RichTextCtrl.MoveCaretForward` Move the caret one visual step forward: this may mean setting a flag and keeping the same position if we're going from the end of one line to the start of the next, which may be the exact same caret position. :meth:`~wx.richtext.RichTextCtrl.MoveDown` Moves the caret down. :meth:`~wx.richtext.RichTextCtrl.MoveEnd` Moves to the end of the buffer. :meth:`~wx.richtext.RichTextCtrl.MoveHome` Moves to the start of the buffer. :meth:`~wx.richtext.RichTextCtrl.MoveLeft` Moves left. :meth:`~wx.richtext.RichTextCtrl.MoveRight` Moves right. :meth:`~wx.richtext.RichTextCtrl.MoveToLineEnd` Moves to the end of the line. :meth:`~wx.richtext.RichTextCtrl.MoveToLineStart` Moves to the start of the line. :meth:`~wx.richtext.RichTextCtrl.MoveToParagraphEnd` Moves to the end of the paragraph. :meth:`~wx.richtext.RichTextCtrl.MoveToParagraphStart` Moves to the start of the paragraph. :meth:`~wx.richtext.RichTextCtrl.MoveUp` Moves to the start of the paragraph. :meth:`~wx.richtext.RichTextCtrl.Newline` Inserts a new paragraph at the current insertion point. :meth:`~wx.richtext.RichTextCtrl.NumberList` Numbers the paragraphs in the given range. :meth:`~wx.richtext.RichTextCtrl.OnCaptureLost` :meth:`~wx.richtext.RichTextCtrl.OnChar` :meth:`~wx.richtext.RichTextCtrl.OnClear` Standard handler for the ``wx.ID_CLEAR`` command. :meth:`~wx.richtext.RichTextCtrl.OnContextMenu` Shows a standard context menu with undo, redo, cut, copy, paste, clear, and select all commands. :meth:`~wx.richtext.RichTextCtrl.OnCopy` Standard handler for the ``wx.ID_COPY`` command. :meth:`~wx.richtext.RichTextCtrl.OnCut` Standard handler for the ``wx.ID_CUT`` command. :meth:`~wx.richtext.RichTextCtrl.OnDropFiles` Loads the first dropped file. :meth:`~wx.richtext.RichTextCtrl.OnEraseBackground` :meth:`~wx.richtext.RichTextCtrl.OnIdle` :meth:`~wx.richtext.RichTextCtrl.OnKillFocus` :meth:`~wx.richtext.RichTextCtrl.OnLeftClick` :meth:`~wx.richtext.RichTextCtrl.OnLeftDClick` :meth:`~wx.richtext.RichTextCtrl.OnLeftUp` :meth:`~wx.richtext.RichTextCtrl.OnMiddleClick` :meth:`~wx.richtext.RichTextCtrl.OnMoveMouse` :meth:`~wx.richtext.RichTextCtrl.OnPaint` :meth:`~wx.richtext.RichTextCtrl.OnPaste` Standard handler for the ``wx.ID_PASTE`` command. :meth:`~wx.richtext.RichTextCtrl.OnProperties` Standard handler for property commands. :meth:`~wx.richtext.RichTextCtrl.OnRedo` Standard handler for the ``wx.ID_REDO`` command. :meth:`~wx.richtext.RichTextCtrl.OnRightClick` :meth:`~wx.richtext.RichTextCtrl.OnScroll` :meth:`~wx.richtext.RichTextCtrl.OnSelectAll` Standard handler for the ``wx.ID_SELECTALL`` command. :meth:`~wx.richtext.RichTextCtrl.OnSetFocus` :meth:`~wx.richtext.RichTextCtrl.OnSize` :meth:`~wx.richtext.RichTextCtrl.OnSysColourChanged` :meth:`~wx.richtext.RichTextCtrl.OnTimer` Respond to timer events. :meth:`~wx.richtext.RichTextCtrl.OnUndo` Standard handler for the ``wx.ID_UNDO`` command. :meth:`~wx.richtext.RichTextCtrl.OnUpdateClear` Standard update handler for the ``wx.ID_CLEAR`` command. :meth:`~wx.richtext.RichTextCtrl.OnUpdateCopy` Standard update handler for the ``wx.ID_COPY`` command. :meth:`~wx.richtext.RichTextCtrl.OnUpdateCut` Standard update handler for the ``wx.ID_CUT`` command. :meth:`~wx.richtext.RichTextCtrl.OnUpdatePaste` Standard update handler for the ``wx.ID_PASTE`` command. :meth:`~wx.richtext.RichTextCtrl.OnUpdateProperties` Standard update handler for property commands. :meth:`~wx.richtext.RichTextCtrl.OnUpdateRedo` Standard update handler for the ``wx.ID_REDO`` command. :meth:`~wx.richtext.RichTextCtrl.OnUpdateSelectAll` Standard update handler for the ``wx.ID_SELECTALL`` command. :meth:`~wx.richtext.RichTextCtrl.OnUpdateUndo` Standard update handler for the ``wx.ID_UNDO`` command. :meth:`~wx.richtext.RichTextCtrl.PageDown` Moves one or more pages down. :meth:`~wx.richtext.RichTextCtrl.PageUp` Moves one or more pages up. :meth:`~wx.richtext.RichTextCtrl.PaintAboveContent` Other user defined painting after everything else (i.e. all text) is painted. :meth:`~wx.richtext.RichTextCtrl.PaintBackground` Paints the background. :meth:`~wx.richtext.RichTextCtrl.Paste` Pastes content from the clipboard to the buffer. :meth:`~wx.richtext.RichTextCtrl.PopStyleSheet` Pops the style sheet from top of stack. :meth:`~wx.richtext.RichTextCtrl.PositionCaret` Internal function to position the visible caret according to the current caret position. :meth:`~wx.richtext.RichTextCtrl.PositionToXY` Converts a text position to zero-based column and line numbers. :meth:`~wx.richtext.RichTextCtrl.PrepareContent` Prepares the content just before insertion (or after buffer reset). :meth:`~wx.richtext.RichTextCtrl.PrepareContextMenu` Prepares the context menu, optionally adding appropriate property-editing commands. :meth:`~wx.richtext.RichTextCtrl.ProcessBackKey` Processes the back key. :meth:`~wx.richtext.RichTextCtrl.ProcessDelayedImageLoading` Do delayed image loading and garbage-collect other images. :meth:`~wx.richtext.RichTextCtrl.ProcessMouseMovement` Processes mouse movement in order to change the cursor. :meth:`~wx.richtext.RichTextCtrl.PromoteList` Promotes or demotes the paragraphs in the given range. :meth:`~wx.richtext.RichTextCtrl.PushStyleSheet` Push the style sheet to top of stack. :meth:`~wx.richtext.RichTextCtrl.Redo` Redoes the current command. :meth:`~wx.richtext.RichTextCtrl.RefreshForSelectionChange` Refreshes the area affected by a selection change. :meth:`~wx.richtext.RichTextCtrl.Remove` Removes the content in the specified range. :meth:`~wx.richtext.RichTextCtrl.Replace` Replaces the content in the specified range with the string specified by `value`. :meth:`~wx.richtext.RichTextCtrl.RequestDelayedImageProcessing` Request delayed image processing. :meth:`~wx.richtext.RichTextCtrl.SaveFile` Saves the buffer content using the given type. :meth:`~wx.richtext.RichTextCtrl.ScrollIntoView` Scrolls `position` into view. :meth:`~wx.richtext.RichTextCtrl.SelectAll` Selects all the text in the buffer. :meth:`~wx.richtext.RichTextCtrl.SelectNone` Cancels any selection. :meth:`~wx.richtext.RichTextCtrl.SelectWord` Selects the word at the given character position. :meth:`~wx.richtext.RichTextCtrl.SetAndShowDefaultStyle` Sets `attr` as the default style and tells the control that the UI should reflect this attribute until the user moves the caret. :meth:`~wx.richtext.RichTextCtrl.SetBasicStyle` Sets the basic (overall) style. :meth:`~wx.richtext.RichTextCtrl.SetCaretAtLineStart` Sets a flag to remember that we are showing the caret position at the start of a line instead of at the end of the previous one. :meth:`~wx.richtext.RichTextCtrl.SetCaretPosition` Sets the caret position. :meth:`~wx.richtext.RichTextCtrl.SetCaretPositionAfterClick` Sets up the caret for the given position and container, after a mouse click. :meth:`~wx.richtext.RichTextCtrl.SetCaretPositionForDefaultStyle` Set the caret position for the default style that the user is selecting. :meth:`~wx.richtext.RichTextCtrl.SetContextMenu` Sets the current context menu. :meth:`~wx.richtext.RichTextCtrl.SetDefaultStyle` Sets the current default style, which can be used to change how subsequently inserted text is displayed. :meth:`~wx.richtext.RichTextCtrl.SetDefaultStyleToCursorStyle` Sets the default style to the style under the cursor. :meth:`~wx.richtext.RichTextCtrl.SetDelayedImageProcessingRequired` Sets the flag indicating that delayed image processing is required. :meth:`~wx.richtext.RichTextCtrl.SetDelayedImageProcessingTime` Sets the last time delayed image processing was performed. :meth:`~wx.richtext.RichTextCtrl.SetDelayedLayoutThreshold` Sets the size of the buffer beyond which layout is delayed during resizing. :meth:`~wx.richtext.RichTextCtrl.SetDimensionScale` Sets the scale factor for displaying certain dimensions such as indentation and inter-paragraph spacing. :meth:`~wx.richtext.RichTextCtrl.SetDragStartPoint` Set the possible Drag'n'Drop start point. :meth:`~wx.richtext.RichTextCtrl.SetDragStartTime` Set the possible Drag'n'Drop start time. :meth:`~wx.richtext.RichTextCtrl.SetDragging` Sets a flag to remember if we are extending a selection. :meth:`~wx.richtext.RichTextCtrl.SetEditable` Makes the control editable, or not. :meth:`~wx.richtext.RichTextCtrl.SetFilename` Sets the current filename. :meth:`~wx.richtext.RichTextCtrl.SetFocusObject` Sets the :ref:`wx.richtext.RichTextObject` object that currently has the editing focus. :meth:`~wx.richtext.RichTextCtrl.SetFont` Sets the font, and also the basic and default attributes (see :meth:`wx.richtext.RichTextCtrl.SetDefaultStyle` ). :meth:`~wx.richtext.RichTextCtrl.SetFontScale` Sets the scale factor for displaying fonts, for example for more comfortable editing. :meth:`~wx.richtext.RichTextCtrl.SetFullLayoutRequired` :meth:`~wx.richtext.RichTextCtrl.SetFullLayoutSavedPosition` :meth:`~wx.richtext.RichTextCtrl.SetFullLayoutTime` :meth:`~wx.richtext.RichTextCtrl.SetHandlerFlags` Sets flags that change the behaviour of loading or saving. :meth:`~wx.richtext.RichTextCtrl.SetHint` Sets a hint shown in an empty unfocused text control. :meth:`~wx.richtext.RichTextCtrl.SetInsertionPoint` Sets the insertion point and causes the current editing style to be taken from the new position (unlike :meth:`wx.richtext.RichTextCtrl.SetCaretPosition` ). :meth:`~wx.richtext.RichTextCtrl.SetInsertionPointEnd` Sets the insertion point to the end of the text control. :meth:`~wx.richtext.RichTextCtrl.SetInternalSelectionRange` Sets the selection range in character positions. :meth:`~wx.richtext.RichTextCtrl.SetListStyle` Sets the list attributes for the given range, passing flags to determine how the attributes are set. :meth:`~wx.richtext.RichTextCtrl.SetMargins` Attempts to set the control margins. :meth:`~wx.richtext.RichTextCtrl.SetMaxLength` Sets the maximum number of characters that may be entered in a single line text control. :meth:`~wx.richtext.RichTextCtrl.SetModified` :meth:`~wx.richtext.RichTextCtrl.SetPreDrag` Set if we're trying to start Drag'n'Drop. :meth:`~wx.richtext.RichTextCtrl.SetProperties` Sets the properties for the given range, passing flags to determine how the attributes are set. :meth:`~wx.richtext.RichTextCtrl.SetScale` Sets an overall scale factor for displaying and editing the content. :meth:`~wx.richtext.RichTextCtrl.SetSelection` Sets the selection to the given range. :meth:`~wx.richtext.RichTextCtrl.SetSelectionAnchor` Sets an anchor so we know how to extend the selection. :meth:`~wx.richtext.RichTextCtrl.SetSelectionAnchorObject` Sets the anchor object if selecting multiple containers. :meth:`~wx.richtext.RichTextCtrl.SetSelectionRange` Sets the selection to the given range. :meth:`~wx.richtext.RichTextCtrl.SetStyle` Sets the attributes for the given range. :meth:`~wx.richtext.RichTextCtrl.SetStyleEx` Sets the attributes for the given range, passing flags to determine how the attributes are set. :meth:`~wx.richtext.RichTextCtrl.SetStyleSheet` Sets the style sheet associated with the control. :meth:`~wx.richtext.RichTextCtrl.SetTextCursor` Sets the text (normal) cursor. :meth:`~wx.richtext.RichTextCtrl.SetURLCursor` Sets the cursor to be used over URLs. :meth:`~wx.richtext.RichTextCtrl.SetValue` Replaces existing content with the given text. :meth:`~wx.richtext.RichTextCtrl.SetupScrollbars` A helper function setting up scrollbars, for example after a resize. :meth:`~wx.richtext.RichTextCtrl.ShouldInheritColours` Return ``True`` from here to allow the colours of this window to be changed by :meth:`~RichTextCtrl.InheritAttributes` . :meth:`~wx.richtext.RichTextCtrl.ShowContextMenu` Shows the given context menu, optionally adding appropriate property-editing commands for the current position in the object hierarchy. :meth:`~wx.richtext.RichTextCtrl.ShowPosition` Scrolls the buffer so that the given position is in view. :meth:`~wx.richtext.RichTextCtrl.StartCellSelection` Starts selecting table cells. :meth:`~wx.richtext.RichTextCtrl.StoreFocusObject` Setter for m_focusObject. :meth:`~wx.richtext.RichTextCtrl.SuppressingUndo` Returns ``True`` if undo history suppression is on. :meth:`~wx.richtext.RichTextCtrl.Undo` Undoes the command at the top of the command history, if there is one. :meth:`~wx.richtext.RichTextCtrl.WordLeft` Moves a number of words to the left. :meth:`~wx.richtext.RichTextCtrl.WordRight` Move a number of words to the right. :meth:`~wx.richtext.RichTextCtrl.WriteField` Writes a field at the current insertion point. :meth:`~wx.richtext.RichTextCtrl.WriteImage` Write a bitmap or image at the current insertion point. :meth:`~wx.richtext.RichTextCtrl.WriteTable` Write a table at the current insertion point, returning the table. :meth:`~wx.richtext.RichTextCtrl.WriteText` Writes text at the current position. :meth:`~wx.richtext.RichTextCtrl.WriteTextBox` Write a text box at the current insertion point, returning the text box. :meth:`~wx.richtext.RichTextCtrl.XYToPosition` Translates from column and line number to position. ================================================================================ ================================================================================ | |property_summary| Properties Summary ===================================== ================================================================================ ================================================================================ :attr:`~wx.richtext.RichTextCtrl.BasicStyle` See :meth:`~wx.richtext.RichTextCtrl.GetBasicStyle` and :meth:`~wx.richtext.RichTextCtrl.SetBasicStyle` :attr:`~wx.richtext.RichTextCtrl.Buffer` See :meth:`~wx.richtext.RichTextCtrl.GetBuffer` :attr:`~wx.richtext.RichTextCtrl.CaretAtLineStart` See :meth:`~wx.richtext.RichTextCtrl.GetCaretAtLineStart` and :meth:`~wx.richtext.RichTextCtrl.SetCaretAtLineStart` :attr:`~wx.richtext.RichTextCtrl.CaretPosition` See :meth:`~wx.richtext.RichTextCtrl.GetCaretPosition` and :meth:`~wx.richtext.RichTextCtrl.SetCaretPosition` :attr:`~wx.richtext.RichTextCtrl.CaretPositionForDefaultStyle` See :meth:`~wx.richtext.RichTextCtrl.GetCaretPositionForDefaultStyle` and :meth:`~wx.richtext.RichTextCtrl.SetCaretPositionForDefaultStyle` :attr:`~wx.richtext.RichTextCtrl.CommandProcessor` See :meth:`~wx.richtext.RichTextCtrl.GetCommandProcessor` :attr:`~wx.richtext.RichTextCtrl.ContextMenu` See :meth:`~wx.richtext.RichTextCtrl.GetContextMenu` and :meth:`~wx.richtext.RichTextCtrl.SetContextMenu` :attr:`~wx.richtext.RichTextCtrl.ContextMenuPropertiesInfo` See :meth:`~wx.richtext.RichTextCtrl.GetContextMenuPropertiesInfo` :attr:`~wx.richtext.RichTextCtrl.DefaultStyle` See :meth:`~wx.richtext.RichTextCtrl.GetDefaultStyle` and :meth:`~wx.richtext.RichTextCtrl.SetDefaultStyle` :attr:`~wx.richtext.RichTextCtrl.DefaultStyleEx` See :meth:`~wx.richtext.RichTextCtrl.GetDefaultStyleEx` :attr:`~wx.richtext.RichTextCtrl.DelayedImageLoading` See :meth:`~wx.richtext.RichTextCtrl.GetDelayedImageLoading` :attr:`~wx.richtext.RichTextCtrl.DelayedImageProcessingRequired` See :meth:`~wx.richtext.RichTextCtrl.GetDelayedImageProcessingRequired` and :meth:`~wx.richtext.RichTextCtrl.SetDelayedImageProcessingRequired` :attr:`~wx.richtext.RichTextCtrl.DelayedImageProcessingTime` See :meth:`~wx.richtext.RichTextCtrl.GetDelayedImageProcessingTime` and :meth:`~wx.richtext.RichTextCtrl.SetDelayedImageProcessingTime` :attr:`~wx.richtext.RichTextCtrl.DelayedLayoutThreshold` See :meth:`~wx.richtext.RichTextCtrl.GetDelayedLayoutThreshold` and :meth:`~wx.richtext.RichTextCtrl.SetDelayedLayoutThreshold` :attr:`~wx.richtext.RichTextCtrl.DimensionScale` See :meth:`~wx.richtext.RichTextCtrl.GetDimensionScale` and :meth:`~wx.richtext.RichTextCtrl.SetDimensionScale` :attr:`~wx.richtext.RichTextCtrl.DragStartPoint` See :meth:`~wx.richtext.RichTextCtrl.GetDragStartPoint` and :meth:`~wx.richtext.RichTextCtrl.SetDragStartPoint` :attr:`~wx.richtext.RichTextCtrl.DragStartTime` See :meth:`~wx.richtext.RichTextCtrl.GetDragStartTime` and :meth:`~wx.richtext.RichTextCtrl.SetDragStartTime` :attr:`~wx.richtext.RichTextCtrl.Dragging` See :meth:`~wx.richtext.RichTextCtrl.GetDragging` and :meth:`~wx.richtext.RichTextCtrl.SetDragging` :attr:`~wx.richtext.RichTextCtrl.Filename` See :meth:`~wx.richtext.RichTextCtrl.GetFilename` and :meth:`~wx.richtext.RichTextCtrl.SetFilename` :attr:`~wx.richtext.RichTextCtrl.FirstVisiblePoint` See :meth:`~wx.richtext.RichTextCtrl.GetFirstVisiblePoint` :attr:`~wx.richtext.RichTextCtrl.FirstVisiblePosition` See :meth:`~wx.richtext.RichTextCtrl.GetFirstVisiblePosition` :attr:`~wx.richtext.RichTextCtrl.FocusObject` See :meth:`~wx.richtext.RichTextCtrl.GetFocusObject` and :meth:`~wx.richtext.RichTextCtrl.SetFocusObject` :attr:`~wx.richtext.RichTextCtrl.FontScale` See :meth:`~wx.richtext.RichTextCtrl.GetFontScale` and :meth:`~wx.richtext.RichTextCtrl.SetFontScale` :attr:`~wx.richtext.RichTextCtrl.FullLayoutRequired` See :meth:`~wx.richtext.RichTextCtrl.GetFullLayoutRequired` and :meth:`~wx.richtext.RichTextCtrl.SetFullLayoutRequired` :attr:`~wx.richtext.RichTextCtrl.FullLayoutSavedPosition` See :meth:`~wx.richtext.RichTextCtrl.GetFullLayoutSavedPosition` and :meth:`~wx.richtext.RichTextCtrl.SetFullLayoutSavedPosition` :attr:`~wx.richtext.RichTextCtrl.FullLayoutTime` See :meth:`~wx.richtext.RichTextCtrl.GetFullLayoutTime` and :meth:`~wx.richtext.RichTextCtrl.SetFullLayoutTime` :attr:`~wx.richtext.RichTextCtrl.HandlerFlags` See :meth:`~wx.richtext.RichTextCtrl.GetHandlerFlags` and :meth:`~wx.richtext.RichTextCtrl.SetHandlerFlags` :attr:`~wx.richtext.RichTextCtrl.Hint` See :meth:`~wx.richtext.RichTextCtrl.GetHint` and :meth:`~wx.richtext.RichTextCtrl.SetHint` :attr:`~wx.richtext.RichTextCtrl.ImagesEnabled` See :meth:`~wx.richtext.RichTextCtrl.GetImagesEnabled` :attr:`~wx.richtext.RichTextCtrl.InsertionPoint` See :meth:`~wx.richtext.RichTextCtrl.GetInsertionPoint` and :meth:`~wx.richtext.RichTextCtrl.SetInsertionPoint` :attr:`~wx.richtext.RichTextCtrl.InternalSelectionRange` See :meth:`~wx.richtext.RichTextCtrl.GetInternalSelectionRange` and :meth:`~wx.richtext.RichTextCtrl.SetInternalSelectionRange` :attr:`~wx.richtext.RichTextCtrl.LastPosition` See :meth:`~wx.richtext.RichTextCtrl.GetLastPosition` :attr:`~wx.richtext.RichTextCtrl.Margins` See :meth:`~wx.richtext.RichTextCtrl.GetMargins` and :meth:`~wx.richtext.RichTextCtrl.SetMargins` :attr:`~wx.richtext.RichTextCtrl.NumberOfLines` See :meth:`~wx.richtext.RichTextCtrl.GetNumberOfLines` :attr:`~wx.richtext.RichTextCtrl.PreDrag` See :meth:`~wx.richtext.RichTextCtrl.GetPreDrag` and :meth:`~wx.richtext.RichTextCtrl.SetPreDrag` :attr:`~wx.richtext.RichTextCtrl.Scale` See :meth:`~wx.richtext.RichTextCtrl.GetScale` and :meth:`~wx.richtext.RichTextCtrl.SetScale` :attr:`~wx.richtext.RichTextCtrl.Selection` See :meth:`~wx.richtext.RichTextCtrl.GetSelection` and :meth:`~wx.richtext.RichTextCtrl.SetSelection` :attr:`~wx.richtext.RichTextCtrl.SelectionAnchor` See :meth:`~wx.richtext.RichTextCtrl.GetSelectionAnchor` and :meth:`~wx.richtext.RichTextCtrl.SetSelectionAnchor` :attr:`~wx.richtext.RichTextCtrl.SelectionAnchorObject` See :meth:`~wx.richtext.RichTextCtrl.GetSelectionAnchorObject` and :meth:`~wx.richtext.RichTextCtrl.SetSelectionAnchorObject` :attr:`~wx.richtext.RichTextCtrl.SelectionRange` See :meth:`~wx.richtext.RichTextCtrl.GetSelectionRange` and :meth:`~wx.richtext.RichTextCtrl.SetSelectionRange` :attr:`~wx.richtext.RichTextCtrl.StringSelection` See :meth:`~wx.richtext.RichTextCtrl.GetStringSelection` :attr:`~wx.richtext.RichTextCtrl.StyleSheet` See :meth:`~wx.richtext.RichTextCtrl.GetStyleSheet` and :meth:`~wx.richtext.RichTextCtrl.SetStyleSheet` :attr:`~wx.richtext.RichTextCtrl.TextCursor` See :meth:`~wx.richtext.RichTextCtrl.GetTextCursor` and :meth:`~wx.richtext.RichTextCtrl.SetTextCursor` :attr:`~wx.richtext.RichTextCtrl.URLCursor` See :meth:`~wx.richtext.RichTextCtrl.GetURLCursor` and :meth:`~wx.richtext.RichTextCtrl.SetURLCursor` :attr:`~wx.richtext.RichTextCtrl.Value` See :meth:`~wx.richtext.RichTextCtrl.GetValue` and :meth:`~wx.richtext.RichTextCtrl.SetValue` :attr:`~wx.richtext.RichTextCtrl.VerticalScrollbarEnabled` See :meth:`~wx.richtext.RichTextCtrl.GetVerticalScrollbarEnabled` :attr:`~wx.richtext.RichTextCtrl.VirtualAttributesEnabled` See :meth:`~wx.richtext.RichTextCtrl.GetVirtualAttributesEnabled` ================================================================================ ================================================================================ | |api| Class API =============== .. class:: wx.richtext.RichTextCtrl(Control) **Possible constructors**:: RichTextCtrl() RichTextCtrl(parent, id=-1, value="", pos=DefaultPosition, size=DefaultSize, style=RE_MULTILINE, validator=DefaultValidator, name=TextCtrlNameStr) RichTextCtrl provides a generic, ground-up implementation of a text control capable of showing multiple styles and images. .. method:: __init__(self, *args, **kw) |overload| Overloaded Implementations: :html:`

` **__init__** `(self)` Default constructor. :html:`

` **__init__** `(self, parent, id=-1, value="", pos=DefaultPosition, size=DefaultSize, style=RE_MULTILINE, validator=DefaultValidator, name=TextCtrlNameStr)` Constructor, creating and showing a rich text control. :param `parent`: Parent window. Must not be ``None``. :type `parent`: wx.Window :param `id`: Window identifier. The value ``ID_ANY`` indicates a default value. :type `id`: wx.WindowID :param `value`: Default string. :type `value`: string :param `pos`: Window position. :type `pos`: wx.Point :param `size`: Window size. :type `size`: wx.Size :param `style`: Window style. :type `style`: long :param `validator`: Window validator. :type `validator`: wx.Validator :param `name`: Window name. :type `name`: string .. seealso:: :meth:`Create` , :ref:`wx.Validator` :html:`

` .. method:: AddImage(self, image) Adds an image to the control's buffer. :param `image`: :type `image`: wx.Image :rtype: :ref:`wx.richtext.RichTextRange` .. method:: AddParagraph(self, text) Adds a new paragraph of text to the end of the buffer. :param `text`: :type `text`: string :rtype: :ref:`wx.richtext.RichTextRange` .. method:: AppendText(self, text) Sets the insertion point to the end of the buffer and writes the text. :param `text`: :type `text`: string .. method:: ApplyAlignmentToSelection(self, alignment) Applies the given alignment to the selection or the default style (undoable). For alignment values, see :ref:`wx.TextAttr`. :param `alignment`: :type `alignment`: wx.TextAttrAlignment :rtype: `bool` .. method:: ApplyBoldToSelection(self) Apples bold to the selection or the default style (undoable). :rtype: `bool` .. method:: ApplyItalicToSelection(self) Applies italic to the selection or the default style (undoable). :rtype: `bool` .. method:: ApplyStyle(self, styleDef) Applies the style sheet to the buffer, matching paragraph styles in the sheet against named styles in the buffer. This might be useful if the styles have changed. If `sheet` is ``None``, the sheet set with :meth:`SetStyleSheet` is used. Currently this applies paragraph styles only. :param `styleDef`: :type `styleDef`: wx.richtext.RichTextStyleDefinition :rtype: `bool` .. method:: ApplyStyleSheet(self, styleSheet=None) Applies the style sheet to the buffer, for example if the styles have changed. :param `styleSheet`: :type `styleSheet`: wx.richtext.RichTextStyleSheet :rtype: `bool` .. method:: ApplyTextEffectToSelection(self, flags) Applies one or more TextAttrEffects flags to the selection (undoable). If there is no selection, it is applied to the default style. :param `flags`: :type `flags`: int :rtype: `bool` .. method:: ApplyUnderlineToSelection(self) Applies underline to the selection or the default style (undoable). :rtype: `bool` .. method:: AutoComplete(self, *args, **kw) |overload| Overloaded Implementations: :html:`

` **AutoComplete** `(self, choices)` Call this function to enable auto-completion of the text typed in a single-line text control using the given `choices`. :param `choices`: :type `choices`: list of strings :rtype: `bool` :returns: ``True`` if the auto-completion was enabled or ``False`` if the operation failed, typically because auto-completion is not supported by the current platform. .. versionadded:: 2.9.0 .. seealso:: :meth:`AutoCompleteFileNames` :html:`

` **AutoComplete** `(self, completer)` Enable auto-completion using the provided completer object. This method should be used instead of :meth:`AutoComplete` overload taking the array of possible completions if the total number of strings is too big as it allows returning the completions dynamically, depending on the text already entered by user and so is more efficient. The specified `completer` object will be used to retrieve the list of possible completions for the already entered text and will be deleted by :ref:`wx.TextEntry` itself when it's not needed any longer. Notice that you need to include `/textcompleter.h` in order to define your class inheriting from :ref:`wx.TextCompleter`. :param `completer`: The object to be used for generating completions if not ``None``. If it is ``None``, auto-completion is disabled. The :ref:`wx.TextEntry` object takes ownership of this pointer and will delete it in any case (i.e. even if this method returns ``False``). :type `completer`: wx.TextCompleter :rtype: `bool` :returns: ``True`` if the auto-completion was enabled or ``False`` if the operation failed, typically because auto-completion is not supported by the current platform. .. versionadded:: 2.9.2 .. seealso:: :ref:`wx.TextCompleter` :html:`

` .. method:: AutoCompleteDirectories(self) Call this function to enable auto-completion of the text using the file system directories. Unlike :meth:`AutoCompleteFileNames` which completes both file names and directories, this function only completes the directory names. Notice that currently this function is only implemented in wxMSW port and does nothing under the other platforms. :rtype: `bool` :returns: ``True`` if the auto-completion was enabled or ``False`` if the operation failed, typically because auto-completion is not supported by the current platform. .. versionadded:: 2.9.3 .. seealso:: :meth:`AutoComplete` .. method:: AutoCompleteFileNames(self) Call this function to enable auto-completion of the text typed in a single-line text control using all valid file system paths. Notice that currently this function is only implemented in wxMSW port and does nothing under the other platforms. :rtype: `bool` :returns: ``True`` if the auto-completion was enabled or ``False`` if the operation failed, typically because auto-completion is not supported by the current platform. .. versionadded:: 2.9.0 .. seealso:: :meth:`AutoComplete` .. method:: BatchingUndo(self) Returns ``True`` if undo commands are being batched. :rtype: `bool` .. method:: BeginAlignment(self, alignment) Begins using alignment. For alignment values, see :ref:`wx.TextAttr`. :param `alignment`: :type `alignment`: wx.TextAttrAlignment :rtype: `bool` .. method:: BeginBatchUndo(self, cmdName) Starts batching undo history for commands. :param `cmdName`: :type `cmdName`: string :rtype: `bool` .. method:: BeginBold(self) Begins using bold. :rtype: `bool` .. method:: BeginCharacterStyle(self, characterStyle) Begins using the named character style. :param `characterStyle`: :type `characterStyle`: string :rtype: `bool` .. method:: BeginFont(self, font) Begins using this font. :param `font`: :type `font`: wx.Font :rtype: `bool` .. method:: BeginFontSize(self, pointSize) Begins using the given point size. :param `pointSize`: :type `pointSize`: int :rtype: `bool` .. method:: BeginItalic(self) Begins using italic. :rtype: `bool` .. method:: BeginLeftIndent(self, leftIndent, leftSubIndent=0) Begins applying a left indent and subindent in tenths of a millimetre. The subindent is an offset from the left edge of the paragraph, and is used for all but the first line in a paragraph. A positive value will cause the first line to appear to the left of the subsequent lines, and a negative value will cause the first line to be indented to the right of the subsequent lines. :ref:`wx.richtext.RichTextBuffer` uses indentation to render a bulleted item. The content of the paragraph, including the first line, starts at the `leftIndent` plus the `leftSubIndent`. :param `leftIndent`: The distance between the margin and the bullet. :type `leftIndent`: int :param `leftSubIndent`: The distance between the left edge of the bullet and the left edge of the actual paragraph. :type `leftSubIndent`: int :rtype: `bool` .. method:: BeginLineSpacing(self, lineSpacing) Begins applying line spacing. `spacing` is a multiple, where 10 means single-spacing, 15 means 1.5 spacing, and 20 means float spacing. The :ref:`wx.TextAttrLineSpacing` constants are defined for convenience. :param `lineSpacing`: :type `lineSpacing`: int :rtype: `bool` .. method:: BeginListStyle(self, listStyle, level=1, number=1) Begins using a specified list style. Optionally, you can also pass a level and a number. :param `listStyle`: :type `listStyle`: string :param `level`: :type `level`: int :param `number`: :type `number`: int :rtype: `bool` .. method:: BeginNumberedBullet(self, bulletNumber, leftIndent, leftSubIndent, bulletStyle=TEXT_ATTR_BULLET_STYLE_ARABIC|TEXT_ATTR_BULLET_STYLE_PERIOD) Begins a numbered bullet. This call will be needed for each item in the list, and the application should take care of incrementing the numbering. `bulletNumber` is a number, usually starting with 1. `leftIndent` and `leftSubIndent` are values in tenths of a millimetre. `bulletStyle` is a bitlist of the :ref:`wx.TextAttrBulletStyle` values. :ref:`wx.richtext.RichTextBuffer` uses indentation to render a bulleted item. The left indent is the distance between the margin and the bullet. The content of the paragraph, including the first line, starts at leftMargin + leftSubIndent. So the distance between the left edge of the bullet and the left of the actual paragraph is leftSubIndent. :param `bulletNumber`: :type `bulletNumber`: int :param `leftIndent`: :type `leftIndent`: int :param `leftSubIndent`: :type `leftSubIndent`: int :param `bulletStyle`: :type `bulletStyle`: int :rtype: `bool` .. method:: BeginParagraphSpacing(self, before, after) Begins paragraph spacing; pass the before-paragraph and after-paragraph spacing in tenths of a millimetre. :param `before`: :type `before`: int :param `after`: :type `after`: int :rtype: `bool` .. method:: BeginParagraphStyle(self, paragraphStyle) Begins applying the named paragraph style. :param `paragraphStyle`: :type `paragraphStyle`: string :rtype: `bool` .. method:: BeginRightIndent(self, rightIndent) Begins a right indent, specified in tenths of a millimetre. :param `rightIndent`: :type `rightIndent`: int :rtype: `bool` .. method:: BeginStandardBullet(self, bulletName, leftIndent, leftSubIndent, bulletStyle=TEXT_ATTR_BULLET_STYLE_STANDARD) Begins applying a symbol bullet. :param `bulletName`: :type `bulletName`: string :param `leftIndent`: :type `leftIndent`: int :param `leftSubIndent`: :type `leftSubIndent`: int :param `bulletStyle`: :type `bulletStyle`: int :rtype: `bool` .. method:: BeginStyle(self, style) Begins applying a style. :param `style`: :type `style`: wx.richtext.RichTextAttr :rtype: `bool` .. method:: BeginSuppressUndo(self) Starts suppressing undo history for commands. :rtype: `bool` .. method:: BeginSymbolBullet(self, symbol, leftIndent, leftSubIndent, bulletStyle=TEXT_ATTR_BULLET_STYLE_SYMBOL) Begins applying a symbol bullet, using a character from the current font. See :meth:`BeginNumberedBullet` for an explanation of how indentation is used to render the bulleted paragraph. :param `symbol`: :type `symbol`: string :param `leftIndent`: :type `leftIndent`: int :param `leftSubIndent`: :type `leftSubIndent`: int :param `bulletStyle`: :type `bulletStyle`: int :rtype: `bool` .. method:: BeginTextColour(self, colour) Begins using this colour. :param `colour`: :type `colour`: wx.Colour :rtype: `bool` .. method:: BeginURL(self, url, characterStyle="") Begins applying ``wx.TEXT_ATTR_URL`` to the content. Pass a URL and optionally, a character style to apply, since it is common to mark a URL with a familiar style such as blue text with underlining. :param `url`: :type `url`: string :param `characterStyle`: :type `characterStyle`: string :rtype: `bool` .. method:: BeginUnderline(self) Begins using underlining. :rtype: `bool` .. method:: CanCopy(self) Returns ``True`` if selected content can be copied to the clipboard. :rtype: `bool` .. method:: CanCut(self) Returns ``True`` if selected content can be copied to the clipboard and deleted. :rtype: `bool` .. method:: CanDeleteRange(self, container, range) Can we delete this range? Sends an event to the control. :param `container`: :type `container`: wx.richtext.RichTextParagraphLayoutBox :param `range`: :type `range`: wx.richtext.RichTextRange :rtype: `bool` .. method:: CanDeleteSelection(self) Returns ``True`` if selected content can be deleted. :rtype: `bool` .. method:: CanEditProperties(self, obj) Returns ``True`` if we can edit the object's properties via a GUI. :param `obj`: :type `obj`: wx.richtext.RichTextObject :rtype: `bool` .. method:: CanInsertContent(self, container, pos) Can we insert content at this position? Sends an event to the control. :param `container`: :type `container`: wx.richtext.RichTextParagraphLayoutBox :param `pos`: :type `pos`: long :rtype: `bool` .. method:: CanPaste(self) Returns ``True`` if the clipboard content can be pasted to the buffer. :rtype: `bool` .. method:: CanRedo(self) Returns ``True`` if there is a command in the command history that can be redone. :rtype: `bool` .. method:: CanUndo(self) Returns ``True`` if there is a command in the command history that can be undone. :rtype: `bool` .. method:: ChangeValue(self, value) Sets the new text control value. It also marks the control as not-modified which means that IsModified() would return ``False`` immediately after the call to :meth:`ChangeValue` . The insertion point is set to the start of the control (i.e. position 0) by this function. This functions does not generate the ``wxEVT_TEXT`` event but otherwise is identical to :meth:`SetValue` . See :ref:`User Generated Events vs Programmatically Generated Events ` for more information. :param `value`: The new value to set. It may contain newline characters if the text control is multi-line. :type `value`: string .. versionadded:: 2.7.1 .. method:: Clear(self) Clears the buffer content, leaving a single empty paragraph. Cannot be undone. .. staticmethod:: ClearAvailableFontNames() Clears the cache of available font names. .. method:: ClearListStyle(self, range, flags=RICHTEXT_SETSTYLE_WITH_UNDO) Clears the list style from the given range, clearing list-related attributes and applying any named paragraph style associated with each paragraph. `flags` is a bit list of the following: - ``wx.richtext.RICHTEXT_SETSTYLE_WITH_UNDO``: specifies that this command will be undoable. :param `range`: :type `range`: wx.richtext.RichTextRange :param `flags`: :type `flags`: int :rtype: `bool` .. seealso:: :meth:`SetListStyle` , :meth:`PromoteList` , :meth:`NumberList` . .. method:: Command(self, event) Sends the event to the control. :param `event`: :type `event`: wx.CommandEvent .. method:: Copy(self) Copies the selected content (if any) to the clipboard. .. method:: Create(self, parent, id=-1, value="", pos=DefaultPosition, size=DefaultSize, style=RE_MULTILINE, validator=DefaultValidator, name=TextCtrlNameStr) Creates the underlying window. :param `parent`: :type `parent`: wx.Window :param `id`: :type `id`: wx.WindowID :param `value`: :type `value`: string :param `pos`: :type `pos`: wx.Point :param `size`: :type `size`: wx.Size :param `style`: :type `style`: long :param `validator`: :type `validator`: wx.Validator :param `name`: :type `name`: string :rtype: `bool` .. method:: Cut(self) Copies the selected content (if any) to the clipboard and deletes the selection. This is undoable. .. method:: Delete(self, range) Deletes the content within the given range. :param `range`: :type `range`: wx.richtext.RichTextRange :rtype: `bool` .. method:: DeleteSelectedContent(self, newPos=None) Deletes content if there is a selection, e.g. when pressing a key. Returns the new caret position in `newPos`, or leaves it if there was no action. This is undoable. .. method:: DeleteSelection(self) Deletes the content in the selection, if any. This is undoable. .. method:: DiscardEdits(self) Sets the buffer's modified status to ``False``, and clears the buffer's command history. .. method:: DoGetBestSize(self) Currently this simply returns :ref:`wx.Size`. :rtype: `Size` .. method:: DoGetValue(self) :rtype: `string` .. method:: DoLayoutBuffer(self, buffer, dc, context, rect, parentRect, flags) Implements layout. An application may override this to perform operations before or after layout. :param `buffer`: :type `buffer`: wx.richtext.RichTextBuffer :param `dc`: :type `dc`: wx.DC :param `context`: :type `context`: wx.richtext.RichTextDrawingContext :param `rect`: :type `rect`: wx.Rect :param `parentRect`: :type `parentRect`: wx.Rect :param `flags`: :type `flags`: int .. method:: DoLoadFile(self, file, fileType) Helper function for :meth:`LoadFile` . Loads content into the control's buffer using the given type. If the specified type is ``wx.richtext.RICHTEXT_TYPE_ANY``, the type is deduced from the filename extension. This function looks for a suitable :ref:`wx.richtext.RichTextFileHandler` object. :param `file`: :type `file`: string :param `fileType`: :type `fileType`: int :rtype: `bool` .. method:: DoSaveFile(self, file="", fileType=RICHTEXT_TYPE_ANY) Helper function for :meth:`SaveFile` . Saves the buffer content using the given type. If the specified type is ``wx.richtext.RICHTEXT_TYPE_ANY``, the type is deduced from the filename extension. This function looks for a suitable :ref:`wx.richtext.RichTextFileHandler` object. :param `file`: :type `file`: string :param `fileType`: :type `fileType`: int :rtype: `bool` .. method:: DoThaw(self) .. method:: DoWriteText(self, value, flags=0) :param `value`: :type `value`: string :param `flags`: :type `flags`: int .. method:: DoesSelectionHaveTextEffectFlag(self, flag) Returns ``True`` if all of the selection, or the content at the current caret position, has the supplied TextAttrEffects flag(s). :param `flag`: :type `flag`: int :rtype: `bool` .. method:: EditProperties(self, obj, parent) Edits the object's properties via a GUI. :param `obj`: :type `obj`: wx.richtext.RichTextObject :param `parent`: :type `parent`: wx.Window :rtype: `bool` .. method:: EnableDelayedImageLoading(self, b) Enable or disable delayed image loading. :param `b`: :type `b`: bool .. method:: EnableImages(self, b) Enable or disable images. :param `b`: :type `b`: bool .. method:: EnableVerticalScrollbar(self, enable) Enable or disable the vertical scrollbar. :param `enable`: :type `enable`: bool .. method:: EnableVirtualAttributes(self, b) Pass ``True`` to let the control use virtual attributes. The default is ``False``. :param `b`: :type `b`: bool .. method:: EndAlignment(self) Ends alignment. :rtype: `bool` .. method:: EndAllStyles(self) Ends application of all styles in the current style stack. :rtype: `bool` .. method:: EndBatchUndo(self) Ends batching undo command history. :rtype: `bool` .. method:: EndBold(self) Ends using bold. :rtype: `bool` .. method:: EndCharacterStyle(self) Ends application of a named character style. :rtype: `bool` .. method:: EndFont(self) Ends using a font. :rtype: `bool` .. method:: EndFontSize(self) Ends using a point size. :rtype: `bool` .. method:: EndItalic(self) Ends using italic. :rtype: `bool` .. method:: EndLeftIndent(self) Ends left indent. :rtype: `bool` .. method:: EndLineSpacing(self) Ends line spacing. :rtype: `bool` .. method:: EndListStyle(self) Ends using a specified list style. :rtype: `bool` .. method:: EndNumberedBullet(self) Ends application of a numbered bullet. :rtype: `bool` .. method:: EndParagraphSpacing(self) Ends paragraph spacing. :rtype: `bool` .. method:: EndParagraphStyle(self) Ends application of a named paragraph style. :rtype: `bool` .. method:: EndRightIndent(self) Ends right indent. :rtype: `bool` .. method:: EndStandardBullet(self) Begins applying a standard bullet. :rtype: `bool` .. method:: EndStyle(self) Ends the current style. :rtype: `bool` .. method:: EndSuppressUndo(self) Ends suppressing undo command history. :rtype: `bool` .. method:: EndSymbolBullet(self) Ends applying a symbol bullet. :rtype: `bool` .. method:: EndTextColour(self) Ends applying a text colour. :rtype: `bool` .. method:: EndURL(self) Ends applying a URL. :rtype: `bool` .. method:: EndUnderline(self) End applying underlining. :rtype: `bool` .. method:: ExtendCellSelection(self, table, noRowSteps, noColSteps) Extends a table selection in the given direction. :param `table`: :type `table`: wx.richtext.RichTextTable :param `noRowSteps`: :type `noRowSteps`: int :param `noColSteps`: :type `noColSteps`: int :rtype: `bool` .. method:: ExtendSelection(self, oldPosition, newPosition, flags) Helper function for extending the selection, returning ``True`` if the selection was changed. Selections are in caret positions. :param `oldPosition`: :type `oldPosition`: long :param `newPosition`: :type `newPosition`: long :param `flags`: :type `flags`: int :rtype: `bool` .. method:: FindCaretPositionForCharacterPosition(self, position, hitTestFlags, container, caretLineStart) Find the caret position for the combination of hit-test flags and character position. Returns the caret position and also an indication of where to place the caret (caretLineStart) since this is ambiguous (same position used for end of line and start of next). :param `position`: :type `position`: long :param `hitTestFlags`: :type `hitTestFlags`: int :param `container`: :type `container`: wx.richtext.RichTextParagraphLayoutBox :param `caretLineStart`: :type `caretLineStart`: bool :rtype: `long` .. method:: FindContainerAtPoint(self, pt, position, hit, hitObj, flags=0) Finds the container at the given point, which is assumed to be in client coordinates. :param `pt`: :type `pt`: wx.Point :param `position`: :type `position`: long :param `hit`: :type `hit`: int :param `hitObj`: :type `hitObj`: wx.richtext.RichTextObject :param `flags`: :type `flags`: int :rtype: :ref:`wx.richtext.RichTextParagraphLayoutBox` .. method:: FindNextWordPosition(self, direction=1) Helper function for finding the caret position for the next word. Direction is 1 (forward) or -1 (backwards). :param `direction`: :type `direction`: int :rtype: `long` .. method:: FindRangeForList(self, pos, isNumberedList) Given a character position at which there is a list style, find the range encompassing the same list style by looking backwards and forwards. :param `pos`: :type `pos`: long :param `isNumberedList`: :type `isNumberedList`: bool :rtype: :ref:`wx.richtext.RichTextRange` .. method:: ForceDelayedLayout(self) .. method:: ForceUpper(self) Convert all text entered into the control to upper case. Call this method to ensure that all text entered into the control is converted on the fly to upper case. If the control is not empty, its existing contents is also converted to upper case. .. versionadded:: 4.1/wxWidgets-3.1.0 .. method:: GetAdjustedCaretPosition(self, caretPos) The adjusted caret position is the character position adjusted to take into account whether we're at the start of a paragraph, in which case style information should be taken from the next position, not current one. :param `caretPos`: :type `caretPos`: long :rtype: `long` .. staticmethod:: GetAvailableFontNames() Font names take a long time to retrieve, so cache them (on demand). :rtype: `list of strings` .. method:: GetBasicStyle(self) Gets the basic (overall) style. This is the style of the whole buffer before further styles are applied, unlike the default style, which only affects the style currently being applied (for example, setting the default style to bold will cause subsequently inserted text to be bold). :rtype: :ref:`wx.richtext.RichTextAttr` .. method:: GetBuffer(self) Returns the buffer associated with the control. :rtype: :ref:`wx.richtext.RichTextBuffer` .. method:: GetCaretAtLineStart(self) Returns ``True`` if we are showing the caret position at the start of a line instead of at the end of the previous one. :rtype: `bool` .. method:: GetCaretPosition(self) Returns the current caret position. :rtype: `long` .. method:: GetCaretPositionForDefaultStyle(self) Returns the caret position since the default formatting was changed. As soon as this position changes, we no longer reflect the default style in the UI. A value of -2 means that we should only reflect the style of the content under the caret. :rtype: `long` .. method:: GetCaretPositionForIndex(self, position, rect, container=None) Returns the caret height and position for the given character position. If container is null, the current focus object will be used. .. staticmethod:: GetClassDefaultAttributes(variant=WINDOW_VARIANT_NORMAL) :param `variant`: :type `variant`: wx.WindowVariant :rtype: `VisualAttributes` .. method:: GetCommandProcessor(self) Gets the command processor associated with the control's buffer. :rtype: `CommandProcessor` .. method:: GetContextMenu(self) Returns the current context menu. :rtype: `Menu` .. method:: GetContextMenuPropertiesInfo(self) Returns an object that stores information about context menu property item(s), in order to communicate between the context menu event handler and the code that responds to it. The :ref:`wx.richtext.RichTextContextMenuPropertiesInfo` stores one item for each object that could respond to a property-editing event. If objects are nested, several might be editable. :rtype: :ref:`wx.richtext.RichTextContextMenuPropertiesInfo` .. method:: GetDefaultStyleEx(self) Returns the current default style, which can be used to change how subsequently inserted text is displayed. :rtype: :ref:`wx.richtext.RichTextAttr` .. method:: GetDelayedImageLoading(self) Returns ``True`` if delayed image loading is enabled. :rtype: `bool` .. method:: GetDelayedImageProcessingRequired(self) Gets the flag indicating that delayed image processing is required. :rtype: `bool` .. method:: GetDelayedImageProcessingTime(self) Returns the last time delayed image processing was performed. :rtype: `long` .. method:: GetDelayedLayoutThreshold(self) Gets the size of the buffer beyond which layout is delayed during resizing. This optimizes sizing for large buffers. The default is 20000. :rtype: `long` .. method:: GetDimensionScale(self) Returns the scale factor for displaying certain dimensions such as indentation and inter-paragraph spacing. :rtype: `float` .. method:: GetDragStartPoint(self) Get the possible Drag'n'Drop start point. :rtype: `Point` .. method:: GetDragStartTime(self) Get the possible Drag'n'Drop start time. :rtype: `DateTime` .. method:: GetDragging(self) Returns ``True`` if we are extending a selection. :rtype: `bool` .. method:: GetFilename(self) Gets the current filename associated with the control. :rtype: `string` .. method:: GetFirstVisiblePoint(self) Returns the first visible point in the window. :rtype: `Point` .. method:: GetFirstVisiblePosition(self) Returns the first visible position in the current view. :rtype: `long` .. method:: GetFocusObject(self) Returns the :ref:`wx.richtext.RichTextObject` object that currently has the editing focus. If there are no composite objects, this will be the top-level buffer. :rtype: :ref:`wx.richtext.RichTextParagraphLayoutBox` .. method:: GetFontScale(self) Returns the scale factor for displaying fonts, for example for more comfortable editing. :rtype: `float` .. method:: GetFullLayoutRequired(self) :rtype: `bool` .. method:: GetFullLayoutSavedPosition(self) :rtype: `long` .. method:: GetFullLayoutTime(self) :rtype: `long` .. method:: GetHandlerFlags(self) Returns flags that change the behaviour of loading or saving. See the documentation for each handler class to see what flags are relevant for each handler. :rtype: `int` .. method:: GetHint(self) Returns the current hint string. See :meth:`SetHint` for more information about hints. :rtype: `string` .. versionadded:: 2.9.0 .. method:: GetImagesEnabled(self) Returns ``True`` if images are enabled. :rtype: `bool` .. method:: GetInsertionPoint(self) Returns the current insertion point. :rtype: `long` .. method:: GetInternalSelectionRange(self) Returns the selection range in character positions. -2, -2 means no selection -1, -1 means select everything. The range is in internal format, i.e. a single character selection is denoted by (n, n) :rtype: :ref:`wx.richtext.RichTextRange` .. method:: GetLastPosition(self) Returns the last position in the buffer. :rtype: `wx.TextPos` .. method:: GetLineLength(self, lineNo) Returns the length of the specified line in characters. :param `lineNo`: :type `lineNo`: long :rtype: `int` .. method:: GetLineText(self, lineNo) Returns the text for the given line. :param `lineNo`: :type `lineNo`: long :rtype: `string` .. method:: GetLogicalPoint(self, ptPhysical) Transforms physical window position to logical (unscrolled) position. :param `ptPhysical`: :type `ptPhysical`: wx.Point :rtype: `Point` .. method:: GetMargins(self) Returns the margins used by the control. The ``x`` field of the returned point is the horizontal margin and the ``y`` field is the vertical one. :rtype: :ref:`wx.Point` .. versionadded:: 2.9.1 .. note:: If given margin cannot be accurately determined, its value will be set to -1. On some platforms you cannot obtain valid margin values until you have called :meth:`SetMargins` . .. seealso:: :meth:`SetMargins` .. method:: GetNumberOfLines(self) Returns the number of lines in the buffer. :rtype: `int` .. method:: GetPhysicalPoint(self, ptLogical) Transforms logical (unscrolled) position to physical window position. :param `ptLogical`: :type `ptLogical`: wx.Point :rtype: `Point` .. method:: GetPreDrag(self) Are we trying to start Drag'n'Drop? :rtype: `bool` .. method:: GetPropertiesMenuLabel(self, obj) Gets the object's properties menu label. :param `obj`: :type `obj`: wx.richtext.RichTextObject :rtype: `string` .. method:: GetRange(self, from_, to_) Gets the text for the given range. The end point of range is specified as the last character position of the span of text, plus one. :param `from_`: :type `from_`: long :param `to_`: :type `to_`: long :rtype: `string` .. method:: GetScale(self) Returns an overall scale factor for displaying and editing the content. :rtype: `float` .. method:: GetScaledPoint(self, pt) Returns a scaled point. :param `pt`: :type `pt`: wx.Point :rtype: `Point` .. method:: GetScaledRect(self, rect) Returns a scaled rectangle. :param `rect`: :type `rect`: wx.Rect :rtype: `Rect` .. method:: GetScaledSize(self, sz) Returns a scaled size. :param `sz`: :type `sz`: wx.Size :rtype: `Size` .. method:: GetSelection(self) Returns the range of the current selection. The end point of range is specified as the last character position of the span of text, plus one. If the return values `from` and `to` are the same, there is no selection. :rtype: :ref:`wx.richtext.RichTextSelection` .. method:: GetSelectionAnchor(self) Returns an anchor so we know how to extend the selection. It's a caret position since it's between two characters. :rtype: `long` .. method:: GetSelectionAnchorObject(self) Returns the anchor object if selecting multiple containers. :rtype: :ref:`wx.richtext.RichTextObject` .. method:: GetSelectionRange(self) Returns the selection range in character positions. -1, -1 means no selection. The range is in API convention, i.e. a single character selection is denoted by (n, n+1) :rtype: :ref:`wx.richtext.RichTextRange` .. method:: GetStringSelection(self) Returns the text within the current selection range, if any. :rtype: `string` .. method:: GetStyle(self, *args, **kw) Gets the attributes at the given position. This function gets the combined style - that is, the style you see on the screen as a result of combining base style, paragraph style and character style attributes. To get the character or paragraph style alone, use :meth:`GetUncombinedStyle` . .. method:: GetStyleForRange(self, *args, **kw) Gets the attributes common to the specified range. Attributes that differ in value within the range will not be included in `style` flags. .. method:: GetStyleSheet(self) Returns the style sheet associated with the control, if any. A style sheet allows named character and paragraph styles to be applied. :rtype: :ref:`wx.richtext.RichTextStyleSheet` .. method:: GetTextCursor(self) Returns the text (normal) cursor. :rtype: `Cursor` .. method:: GetURLCursor(self) Returns the cursor to be used over URLs. :rtype: `Cursor` .. method:: GetUncombinedStyle(self, *args, **kw) Gets the attributes at the given position. This function gets the `uncombined` style - that is, the attributes associated with the paragraph or character content, and not necessarily the combined attributes you see on the screen. To get the combined attributes, use :meth:`GetStyle` . If you specify (any) paragraph attribute in `style's` flags, this function will fetch the paragraph attributes. Otherwise, it will return the character attributes. .. method:: GetUnscaledPoint(self, pt) Returns an unscaled point. :param `pt`: :type `pt`: wx.Point :rtype: `Point` .. method:: GetUnscaledRect(self, rect) Returns an unscaled rectangle. :param `rect`: :type `rect`: wx.Rect :rtype: `Rect` .. method:: GetUnscaledSize(self, sz) Returns an unscaled size. :param `sz`: :type `sz`: wx.Size :rtype: `Size` .. method:: GetValue(self) Returns the content of the entire control as a string. :rtype: `string` .. method:: GetVerticalScrollbarEnabled(self) Returns ``True`` if the vertical scrollbar is enabled. :rtype: `bool` .. method:: GetVirtualAttributesEnabled(self) Returns ``True`` if this control can use virtual attributes and virtual text. The default is ``False``. :rtype: `bool` .. method:: GetVisibleLineForCaretPosition(self, caretPosition) Internal helper function returning the line for the visible caret position. If the caret is shown at the very end of the line, it means the next character is actually on the following line. So this function gets the line we're expecting to find if this is the case. :param `caretPosition`: :type `caretPosition`: long :rtype: :ref:`wx.richtext.RichTextLine` .. method:: HasCharacterAttributes(self, range, style) Test if this whole range has character attributes of the specified kind. If any of the attributes are different within the range, the test fails. You can use this to implement, for example, bold button updating. `style` must have flags indicating which attributes are of interest. :param `range`: :type `range`: wx.richtext.RichTextRange :param `style`: :type `style`: wx.richtext.RichTextAttr :rtype: `bool` .. method:: HasParagraphAttributes(self, range, style) Test if this whole range has paragraph attributes of the specified kind. If any of the attributes are different within the range, the test fails. You can use this to implement, for example, centering button updating. `style` must have flags indicating which attributes are of interest. :param `range`: :type `range`: wx.richtext.RichTextRange :param `style`: :type `style`: wx.richtext.RichTextAttr :rtype: `bool` .. method:: HasSelection(self) Returns ``True`` if there is a selection and the object containing the selection was the same as the current focus object. :rtype: `bool` .. method:: HasUnfocusedSelection(self) Returns ``True`` if there was a selection, whether or not the current focus object is the same as the selection's container object. :rtype: `bool` .. method:: HitTest(self, pt) Finds the character at the given position in pixels. `pt` is in device coords (not adjusted for the client area origin nor for scrolling). :param `pt`: :type `pt`: wx.Point :rtype: `tuple` :returns: ( :ref:`wx.TextCtrlHitTestResult`, `pos` ) .. method:: HitTestXY(self, pt) Finds the character at the given position in pixels. `pt` is in device coords (not adjusted for the client area origin nor for scrolling). :param `pt`: :type `pt`: wx.Point :rtype: `tuple` :returns: ( :ref:`wx.TextCtrlHitTestResult`, `col`, `row` ) .. method:: Init(self) Initialises the members of the control. .. method:: Invalidate(self) Invalidates the whole buffer to trigger painting later. .. method:: IsDefaultStyleShowing(self) Returns ``True`` if the user has recently set the default style without moving the caret, and therefore the UI needs to reflect the default style and not the style at the caret. Below is an example of code that uses this function to determine whether the UI should show that the current style is bold. :rtype: `bool` .. seealso:: :meth:`SetAndShowDefaultStyle` . .. method:: IsEditable(self) Returns ``True`` if the control is editable. :rtype: `bool` .. method:: IsEmpty(self) Returns ``True`` if the control is currently empty. This is the same as :meth:`GetValue` .empty() but can be much more efficient for the multiline controls containing big amounts of text. :rtype: `bool` .. versionadded:: 2.7.1 .. method:: IsModified(self) Returns ``True`` if the buffer has been modified. :rtype: `bool` .. method:: IsMultiLine(self) Returns ``True`` if the control is multiline. :rtype: `bool` .. method:: IsPositionVisible(self, pos) Returns ``True`` if the given position is visible on the screen. :param `pos`: :type `pos`: long :rtype: `bool` .. method:: IsSelectionAligned(self, alignment) Returns ``True`` if all of the selection is aligned according to the specified flag. :param `alignment`: :type `alignment`: wx.TextAttrAlignment :rtype: `bool` .. method:: IsSelectionBold(self) Returns ``True`` if all of the selection, or the content at the caret position, is bold. :rtype: `bool` .. method:: IsSelectionItalics(self) Returns ``True`` if all of the selection, or the content at the caret position, is italic. :rtype: `bool` .. method:: IsSelectionUnderlined(self) Returns ``True`` if all of the selection, or the content at the caret position, is underlined. :rtype: `bool` .. method:: IsSingleLine(self) Returns ``True`` if the control is single-line. Currently :ref:`wx.richtext.RichTextCtrl` does not support single-line editing. :rtype: `bool` .. method:: KeyboardNavigate(self, keyCode, flags) Helper function implementing keyboard navigation. :param `keyCode`: :type `keyCode`: int :param `flags`: :type `flags`: int :rtype: `bool` .. method:: LayoutContent(self, onlyVisibleRect=False) Lays out the buffer, which must be done before certain operations, such as setting the caret position. This function should not normally be required by the application. :param `onlyVisibleRect`: :type `onlyVisibleRect`: bool :rtype: `bool` .. method:: LineBreak(self) Inserts a line break at the current insertion point. A line break forces wrapping within a paragraph, and can be introduced by using this function, by appending the Char value **RichTextLineBreakChar** to text content, or by typing Shift-Return. :rtype: `bool` .. method:: LoadFile(self, file, type=RICHTEXT_TYPE_ANY) Loads content into the control's buffer using the given type. If the specified type is ``wx.richtext.RICHTEXT_TYPE_ANY``, the type is deduced from the filename extension. This function looks for a suitable :ref:`wx.richtext.RichTextFileHandler` object. :param `file`: :type `file`: string :param `type`: :type `type`: int :rtype: `bool` .. method:: MarkDirty(self) Marks the buffer as modified. .. method:: MoveCaret(self, pos, showAtLineStart=False, container=None) Move the caret to the given character position. Please note that this does not update the current editing style from the new position; to do that, call :meth:`wx.richtext.RichTextCtrl.SetInsertionPoint` instead. :param `pos`: :type `pos`: long :param `showAtLineStart`: :type `showAtLineStart`: bool :param `container`: :type `container`: wx.richtext.RichTextParagraphLayoutBox :rtype: `bool` .. method:: MoveCaretBack(self, oldPosition) Move the caret one visual step forward: this may mean setting a flag and keeping the same position if we're going from the end of one line to the start of the next, which may be the exact same caret position. :param `oldPosition`: :type `oldPosition`: long .. method:: MoveCaretForward(self, oldPosition) Move the caret one visual step forward: this may mean setting a flag and keeping the same position if we're going from the end of one line to the start of the next, which may be the exact same caret position. :param `oldPosition`: :type `oldPosition`: long .. method:: MoveDown(self, noLines=1, flags=0) Moves the caret down. :param `noLines`: :type `noLines`: int :param `flags`: :type `flags`: int :rtype: `bool` .. method:: MoveEnd(self, flags=0) Moves to the end of the buffer. :param `flags`: :type `flags`: int :rtype: `bool` .. method:: MoveHome(self, flags=0) Moves to the start of the buffer. :param `flags`: :type `flags`: int :rtype: `bool` .. method:: MoveLeft(self, noPositions=1, flags=0) Moves left. :param `noPositions`: :type `noPositions`: int :param `flags`: :type `flags`: int :rtype: `bool` .. method:: MoveRight(self, noPositions=1, flags=0) Moves right. :param `noPositions`: :type `noPositions`: int :param `flags`: :type `flags`: int :rtype: `bool` .. method:: MoveToLineEnd(self, flags=0) Moves to the end of the line. :param `flags`: :type `flags`: int :rtype: `bool` .. method:: MoveToLineStart(self, flags=0) Moves to the start of the line. :param `flags`: :type `flags`: int :rtype: `bool` .. method:: MoveToParagraphEnd(self, flags=0) Moves to the end of the paragraph. :param `flags`: :type `flags`: int :rtype: `bool` .. method:: MoveToParagraphStart(self, flags=0) Moves to the start of the paragraph. :param `flags`: :type `flags`: int :rtype: `bool` .. method:: MoveUp(self, noLines=1, flags=0) Moves to the start of the paragraph. :param `noLines`: :type `noLines`: int :param `flags`: :type `flags`: int :rtype: `bool` .. method:: Newline(self) Inserts a new paragraph at the current insertion point. :rtype: `bool` .. seealso:: :meth:`LineBreak` . .. method:: NumberList(self, *args, **kw) Numbers the paragraphs in the given range. Pass flags to determine how the attributes are set. Either the style definition or the name of the style definition (in the current sheet) can be passed. `flags` is a bit list of the following: - ``wx.richtext.RICHTEXT_SETSTYLE_WITH_UNDO``: specifies that this command will be undoable. - ``wx.richtext.RICHTEXT_SETSTYLE_RENUMBER``: specifies that numbering should start from `startFrom`, otherwise existing attributes are used. - ``wx.richtext.RICHTEXT_SETSTYLE_SPECIFY_LEVEL``: specifies that `listLevel` should be used as the level for all paragraphs, otherwise the current indentation will be used. .. seealso:: :meth:`SetListStyle` , :meth:`PromoteList` , :meth:`ClearListStyle` . |overload| Overloaded Implementations: :html:`

` **NumberList** `(self, range, def=None, flags=RICHTEXT_SETSTYLE_WITH_UNDO, startFrom=1, specifiedLevel=-1)` :param `range`: :type `range`: wx.richtext.RichTextRange :param `def`: :type `def`: wx.richtext.RichTextListStyleDefinition :param `flags`: :type `flags`: int :param `startFrom`: :type `startFrom`: int :param `specifiedLevel`: :type `specifiedLevel`: int :rtype: `bool` :html:`

` **NumberList** `(self, range, defName, flags=RICHTEXT_SETSTYLE_WITH_UNDO, startFrom=1, specifiedLevel=-1)` :param `range`: :type `range`: wx.richtext.RichTextRange :param `defName`: :type `defName`: string :param `flags`: :type `flags`: int :param `startFrom`: :type `startFrom`: int :param `specifiedLevel`: :type `specifiedLevel`: int :rtype: `bool` :html:`

` .. method:: OnCaptureLost(self, event) :param `event`: :type `event`: wx.MouseCaptureLostEvent .. method:: OnChar(self, event) :param `event`: :type `event`: wx.KeyEvent .. method:: OnClear(self, event) Standard handler for the ``wx.ID_CLEAR`` command. :param `event`: :type `event`: wx.CommandEvent .. method:: OnContextMenu(self, event) Shows a standard context menu with undo, redo, cut, copy, paste, clear, and select all commands. :param `event`: :type `event`: wx.ContextMenuEvent .. method:: OnCopy(self, event) Standard handler for the ``wx.ID_COPY`` command. :param `event`: :type `event`: wx.CommandEvent .. method:: OnCut(self, event) Standard handler for the ``wx.ID_CUT`` command. :param `event`: :type `event`: wx.CommandEvent .. method:: OnDropFiles(self, event) Loads the first dropped file. :param `event`: :type `event`: wx.DropFilesEvent .. method:: OnEraseBackground(self, event) :param `event`: :type `event`: wx.EraseEvent .. method:: OnIdle(self, event) :param `event`: :type `event`: wx.IdleEvent .. method:: OnKillFocus(self, event) :param `event`: :type `event`: wx.FocusEvent .. method:: OnLeftClick(self, event) :param `event`: :type `event`: wx.MouseEvent .. method:: OnLeftDClick(self, event) :param `event`: :type `event`: wx.MouseEvent .. method:: OnLeftUp(self, event) :param `event`: :type `event`: wx.MouseEvent .. method:: OnMiddleClick(self, event) :param `event`: :type `event`: wx.MouseEvent .. method:: OnMoveMouse(self, event) :param `event`: :type `event`: wx.MouseEvent .. method:: OnPaint(self, event) :param `event`: :type `event`: wx.PaintEvent .. method:: OnPaste(self, event) Standard handler for the ``wx.ID_PASTE`` command. :param `event`: :type `event`: wx.CommandEvent .. method:: OnProperties(self, event) Standard handler for property commands. :param `event`: :type `event`: wx.CommandEvent .. method:: OnRedo(self, event) Standard handler for the ``wx.ID_REDO`` command. :param `event`: :type `event`: wx.CommandEvent .. method:: OnRightClick(self, event) :param `event`: :type `event`: wx.MouseEvent .. method:: OnScroll(self, event) :param `event`: :type `event`: wx.ScrollWinEvent .. method:: OnSelectAll(self, event) Standard handler for the ``wx.ID_SELECTALL`` command. :param `event`: :type `event`: wx.CommandEvent .. method:: OnSetFocus(self, event) :param `event`: :type `event`: wx.FocusEvent .. method:: OnSize(self, event) :param `event`: :type `event`: wx.SizeEvent .. method:: OnSysColourChanged(self, event) :param `event`: :type `event`: wx.SysColourChangedEvent .. method:: OnTimer(self, event) Respond to timer events. :param `event`: :type `event`: wx.TimerEvent .. method:: OnUndo(self, event) Standard handler for the ``wx.ID_UNDO`` command. :param `event`: :type `event`: wx.CommandEvent .. method:: OnUpdateClear(self, event) Standard update handler for the ``wx.ID_CLEAR`` command. :param `event`: :type `event`: wx.UpdateUIEvent .. method:: OnUpdateCopy(self, event) Standard update handler for the ``wx.ID_COPY`` command. :param `event`: :type `event`: wx.UpdateUIEvent .. method:: OnUpdateCut(self, event) Standard update handler for the ``wx.ID_CUT`` command. :param `event`: :type `event`: wx.UpdateUIEvent .. method:: OnUpdatePaste(self, event) Standard update handler for the ``wx.ID_PASTE`` command. :param `event`: :type `event`: wx.UpdateUIEvent .. method:: OnUpdateProperties(self, event) Standard update handler for property commands. :param `event`: :type `event`: wx.UpdateUIEvent .. method:: OnUpdateRedo(self, event) Standard update handler for the ``wx.ID_REDO`` command. :param `event`: :type `event`: wx.UpdateUIEvent .. method:: OnUpdateSelectAll(self, event) Standard update handler for the ``wx.ID_SELECTALL`` command. :param `event`: :type `event`: wx.UpdateUIEvent .. method:: OnUpdateUndo(self, event) Standard update handler for the ``wx.ID_UNDO`` command. :param `event`: :type `event`: wx.UpdateUIEvent .. method:: PageDown(self, noPages=1, flags=0) Moves one or more pages down. :param `noPages`: :type `noPages`: int :param `flags`: :type `flags`: int :rtype: `bool` .. method:: PageUp(self, noPages=1, flags=0) Moves one or more pages up. :param `noPages`: :type `noPages`: int :param `flags`: :type `flags`: int :rtype: `bool` .. method:: PaintAboveContent(self, WXUNUSED) Other user defined painting after everything else (i.e. all text) is painted. :param `WXUNUSED`: :type `WXUNUSED`: wx.DC .. versionadded:: 2.9.1 .. method:: PaintBackground(self, dc) Paints the background. :param `dc`: :type `dc`: wx.DC .. method:: Paste(self) Pastes content from the clipboard to the buffer. .. method:: PopStyleSheet(self) Pops the style sheet from top of stack. :rtype: :ref:`wx.richtext.RichTextStyleSheet` .. method:: PositionCaret(self, container=None) Internal function to position the visible caret according to the current caret position. :param `container`: :type `container`: wx.richtext.RichTextParagraphLayoutBox .. method:: PositionToXY(self, pos) Converts a text position to zero-based column and line numbers. :param `pos`: :type `pos`: long :rtype: `tuple` :returns: ( `bool`, `x`, `y` ) .. method:: PrepareContent(self, container) Prepares the content just before insertion (or after buffer reset). Called by the same function in :ref:`wx.richtext.RichTextBuffer`. Currently is only called if undo mode is on. :param `container`: :type `container`: wx.richtext.RichTextParagraphLayoutBox .. method:: PrepareContextMenu(self, menu, pt, addPropertyCommands) Prepares the context menu, optionally adding appropriate property-editing commands. Returns the number of property commands added. :param `menu`: :type `menu`: wx.Menu :param `pt`: :type `pt`: wx.Point :param `addPropertyCommands`: :type `addPropertyCommands`: bool :rtype: `int` .. method:: ProcessBackKey(self, event, flags) Processes the back key. :param `event`: :type `event`: wx.KeyEvent :param `flags`: :type `flags`: int :rtype: `bool` .. method:: ProcessDelayedImageLoading(self, *args, **kw) |overload| Overloaded Implementations: :html:`

` **ProcessDelayedImageLoading** `(self, refresh)` Do delayed image loading and garbage-collect other images. :param `refresh`: :type `refresh`: bool :rtype: `bool` :html:`

` **ProcessDelayedImageLoading** `(self, screenRect, box, loadCount)` :param `screenRect`: :type `screenRect`: wx.Rect :param `box`: :type `box`: wx.richtext.RichTextParagraphLayoutBox :param `loadCount`: :type `loadCount`: int :rtype: `bool` :html:`

` .. method:: ProcessMouseMovement(self, container, obj, position, pos) Processes mouse movement in order to change the cursor. :param `container`: :type `container`: wx.richtext.RichTextParagraphLayoutBox :param `obj`: :type `obj`: wx.richtext.RichTextObject :param `position`: :type `position`: long :param `pos`: :type `pos`: wx.Point :rtype: `bool` .. method:: PromoteList(self, *args, **kw) Promotes or demotes the paragraphs in the given range. A positive `promoteBy` produces a smaller indent, and a negative number produces a larger indent. Pass flags to determine how the attributes are set. Either the style definition or the name of the style definition (in the current sheet) can be passed. `flags` is a bit list of the following: - ``wx.richtext.RICHTEXT_SETSTYLE_WITH_UNDO``: specifies that this command will be undoable. - ``wx.richtext.RICHTEXT_SETSTYLE_RENUMBER``: specifies that numbering should start from `startFrom`, otherwise existing attributes are used. - ``wx.richtext.RICHTEXT_SETSTYLE_SPECIFY_LEVEL``: specifies that `listLevel` should be used as the level for all paragraphs, otherwise the current indentation will be used. .. seealso:: :meth:`SetListStyle` , .. seealso:: :meth:`SetListStyle` , :meth:`ClearListStyle` . |overload| Overloaded Implementations: :html:`

` **PromoteList** `(self, promoteBy, range, def=None, flags=RICHTEXT_SETSTYLE_WITH_UNDO, specifiedLevel=-1)` :param `promoteBy`: :type `promoteBy`: int :param `range`: :type `range`: wx.richtext.RichTextRange :param `def`: :type `def`: wx.richtext.RichTextListStyleDefinition :param `flags`: :type `flags`: int :param `specifiedLevel`: :type `specifiedLevel`: int :rtype: `bool` :html:`

` **PromoteList** `(self, promoteBy, range, defName, flags=RICHTEXT_SETSTYLE_WITH_UNDO, specifiedLevel=-1)` :param `promoteBy`: :type `promoteBy`: int :param `range`: :type `range`: wx.richtext.RichTextRange :param `defName`: :type `defName`: string :param `flags`: :type `flags`: int :param `specifiedLevel`: :type `specifiedLevel`: int :rtype: `bool` :html:`

` .. method:: PushStyleSheet(self, styleSheet) Push the style sheet to top of stack. :param `styleSheet`: :type `styleSheet`: wx.richtext.RichTextStyleSheet :rtype: `bool` .. method:: Redo(self) Redoes the current command. .. method:: RefreshForSelectionChange(self, oldSelection, newSelection) Refreshes the area affected by a selection change. :param `oldSelection`: :type `oldSelection`: wx.richtext.RichTextSelection :param `newSelection`: :type `newSelection`: wx.richtext.RichTextSelection :rtype: `bool` .. method:: Remove(self, from_, to_) Removes the content in the specified range. :param `from_`: :type `from_`: long :param `to_`: :type `to_`: long .. method:: Replace(self, from_, to_, value) Replaces the content in the specified range with the string specified by `value`. :param `from_`: :type `from_`: long :param `to_`: :type `to_`: long :param `value`: :type `value`: string .. method:: RequestDelayedImageProcessing(self) Request delayed image processing. .. method:: SaveFile(self, file="", type=RICHTEXT_TYPE_ANY) Saves the buffer content using the given type. If the specified type is ``wx.richtext.RICHTEXT_TYPE_ANY``, the type is deduced from the filename extension. This function looks for a suitable :ref:`wx.richtext.RichTextFileHandler` object. :param `file`: :type `file`: string :param `type`: :type `type`: int :rtype: `bool` .. method:: ScrollIntoView(self, position, keyCode) Scrolls `position` into view. This function takes a caret position. :param `position`: :type `position`: long :param `keyCode`: :type `keyCode`: int :rtype: `bool` .. method:: SelectAll(self) Selects all the text in the buffer. .. method:: SelectNone(self) Cancels any selection. .. method:: SelectWord(self, position) Selects the word at the given character position. :param `position`: :type `position`: long :rtype: `bool` .. method:: SetAndShowDefaultStyle(self, attr) Sets `attr` as the default style and tells the control that the UI should reflect this attribute until the user moves the caret. :param `attr`: :type `attr`: wx.richtext.RichTextAttr .. seealso:: :meth:`IsDefaultStyleShowing` . .. method:: SetBasicStyle(self, style) Sets the basic (overall) style. This is the style of the whole buffer before further styles are applied, unlike the default style, which only affects the style currently being applied (for example, setting the default style to bold will cause subsequently inserted text to be bold). :param `style`: :type `style`: wx.richtext.RichTextAttr .. method:: SetCaretAtLineStart(self, atStart) Sets a flag to remember that we are showing the caret position at the start of a line instead of at the end of the previous one. :param `atStart`: :type `atStart`: bool .. method:: SetCaretPosition(self, position, showAtLineStart=False) Sets the caret position. The caret position is the character position just before the caret. A value of -1 means the caret is at the start of the buffer. Please note that this does not update the current editing style from the new position or cause the actual caret to be refreshed; to do that, call :meth:`wx.richtext.RichTextCtrl.SetInsertionPoint` instead. :param `position`: :type `position`: long :param `showAtLineStart`: :type `showAtLineStart`: bool .. method:: SetCaretPositionAfterClick(self, container, position, hitTestFlags, extendSelection=False) Sets up the caret for the given position and container, after a mouse click. :param `container`: :type `container`: wx.richtext.RichTextParagraphLayoutBox :param `position`: :type `position`: long :param `hitTestFlags`: :type `hitTestFlags`: int :param `extendSelection`: :type `extendSelection`: bool :rtype: `bool` .. method:: SetCaretPositionForDefaultStyle(self, pos) Set the caret position for the default style that the user is selecting. :param `pos`: :type `pos`: long .. method:: SetContextMenu(self, menu) Sets the current context menu. :param `menu`: :type `menu`: wx.Menu .. method:: SetDefaultStyle(self, *args, **kw) Sets the current default style, which can be used to change how subsequently inserted text is displayed. |overload| Overloaded Implementations: :html:`

` **SetDefaultStyle** `(self, style)` :param `style`: :type `style`: wx.TextAttr :rtype: `bool` :html:`

` **SetDefaultStyle** `(self, style)` :param `style`: :type `style`: wx.richtext.RichTextAttr :rtype: `bool` :html:`

` .. method:: SetDefaultStyleToCursorStyle(self) Sets the default style to the style under the cursor. :rtype: `bool` .. method:: SetDelayedImageProcessingRequired(self, b) Sets the flag indicating that delayed image processing is required. :param `b`: :type `b`: bool .. method:: SetDelayedImageProcessingTime(self, t) Sets the last time delayed image processing was performed. :param `t`: :type `t`: long .. method:: SetDelayedLayoutThreshold(self, threshold) Sets the size of the buffer beyond which layout is delayed during resizing. This optimizes sizing for large buffers. The default is 20000. :param `threshold`: :type `threshold`: long .. method:: SetDimensionScale(self, dimScale, refresh=False) Sets the scale factor for displaying certain dimensions such as indentation and inter-paragraph spacing. This can be useful when editing in a small control where you still want legible text, but a minimum of wasted white space. :param `dimScale`: :type `dimScale`: float :param `refresh`: :type `refresh`: bool .. method:: SetDragStartPoint(self, sp) Set the possible Drag'n'Drop start point. :param `sp`: :type `sp`: wx.Point .. method:: SetDragStartTime(self, st) Set the possible Drag'n'Drop start time. :param `st`: :type `st`: wx.DateTime .. method:: SetDragging(self, dragging) Sets a flag to remember if we are extending a selection. :param `dragging`: :type `dragging`: bool .. method:: SetEditable(self, editable) Makes the control editable, or not. :param `editable`: :type `editable`: bool .. method:: SetFilename(self, filename) Sets the current filename. :param `filename`: :type `filename`: string .. method:: SetFocusObject(self, obj, setCaretPosition=True) Sets the :ref:`wx.richtext.RichTextObject` object that currently has the editing focus. :param `obj`: The :ref:`wx.richtext.RichTextObject` to set focus on. :type `obj`: wx.richtext.RichTextParagraphLayoutBox :param `setCaretPosition`: Optionally set the caret position. :type `setCaretPosition`: bool :rtype: `bool` .. method:: SetFont(self, font) Sets the font, and also the basic and default attributes (see :meth:`wx.richtext.RichTextCtrl.SetDefaultStyle` ). :param `font`: :type `font`: wx.Font :rtype: `bool` .. method:: SetFontScale(self, fontScale, refresh=False) Sets the scale factor for displaying fonts, for example for more comfortable editing. :param `fontScale`: :type `fontScale`: float :param `refresh`: :type `refresh`: bool .. method:: SetFullLayoutRequired(self, b) :param `b`: :type `b`: bool .. method:: SetFullLayoutSavedPosition(self, p) :param `p`: :type `p`: long .. method:: SetFullLayoutTime(self, t) :param `t`: :type `t`: long .. method:: SetHandlerFlags(self, flags) Sets flags that change the behaviour of loading or saving. See the documentation for each handler class to see what flags are relevant for each handler. :param `flags`: :type `flags`: int .. method:: SetHint(self, hint) Sets a hint shown in an empty unfocused text control. The hints are usually used to indicate to the user what is supposed to be entered into the given entry field, e.g. a common use of them is to show an explanation of what can be entered in a :ref:`wx.SearchCtrl`. The hint is shown (usually greyed out) for an empty control until it gets focus and is shown again if the control loses it and remains empty. It won't be shown once the control has a non-empty value, although it will be shown again if the control contents is cleared. Because of this, it generally only makes sense to use hints with the controls which are initially empty. Notice that hints are known as `cue banners` under MSW or `placeholder strings` under macOS. For the platforms without native hints support, the implementation has several known limitations. Notably, the hint display will not be properly updated if you change :ref:`wx.TextEntry` contents programmatically when the hint is displayed using methods other than :meth:`SetValue` or :meth:`ChangeValue` or others which use them internally (e.g. :meth:`Clear` ). In other words, currently you should avoid calling methods such as :meth:`WriteText` or :meth:`Replace` when using hints and the text control is empty. If you bind to the control's focus and wxEVT_TEXT events, you must call :meth:`wx.Event.Skip` on them so that the generic implementation works correctly. Another limitation is that hints are ignored for the controls with ``TE_PASSWORD`` style. :param `hint`: :type `hint`: string :rtype: `bool` .. versionadded:: 2.9.0 .. note:: Currently implemented natively on Windows (Vista and later only), macOS and GTK+ (3.2 and later). .. note:: Hints can be used for single line text controls under all platforms, but only MSW and GTK+ 2 support them for multi-line text controls, they are ignored for them under the other platforms. .. method:: SetInsertionPoint(self, pos) Sets the insertion point and causes the current editing style to be taken from the new position (unlike :meth:`wx.richtext.RichTextCtrl.SetCaretPosition` ). :param `pos`: :type `pos`: long .. method:: SetInsertionPointEnd(self) Sets the insertion point to the end of the text control. .. method:: SetInternalSelectionRange(self, range) Sets the selection range in character positions. -2, -2 means no selection -1, -1 means select everything. The range is in internal format, i.e. a single character selection is denoted by (n, n) :param `range`: :type `range`: wx.richtext.RichTextRange .. method:: SetListStyle(self, *args, **kw) Sets the list attributes for the given range, passing flags to determine how the attributes are set. Either the style definition or the name of the style definition (in the current sheet) can be passed. `flags` is a bit list of the following: - ``wx.richtext.RICHTEXT_SETSTYLE_WITH_UNDO``: specifies that this command will be undoable. - ``wx.richtext.RICHTEXT_SETSTYLE_RENUMBER``: specifies that numbering should start from `startFrom`, otherwise existing attributes are used. - ``wx.richtext.RICHTEXT_SETSTYLE_SPECIFY_LEVEL``: specifies that `listLevel` should be used as the level for all paragraphs, otherwise the current indentation will be used. .. seealso:: :meth:`NumberList` , :meth:`PromoteList` , :meth:`ClearListStyle` . |overload| Overloaded Implementations: :html:`

` **SetListStyle** `(self, range, styleDef, flags=RICHTEXT_SETSTYLE_WITH_UNDO, startFrom=1, specifiedLevel=-1)` :param `range`: :type `range`: wx.richtext.RichTextRange :param `styleDef`: :type `styleDef`: wx.richtext.RichTextListStyleDefinition :param `flags`: :type `flags`: int :param `startFrom`: :type `startFrom`: int :param `specifiedLevel`: :type `specifiedLevel`: int :rtype: `bool` :html:`

` **SetListStyle** `(self, range, defName, flags=RICHTEXT_SETSTYLE_WITH_UNDO, startFrom=1, specifiedLevel=-1)` :param `range`: :type `range`: wx.richtext.RichTextRange :param `defName`: :type `defName`: string :param `flags`: :type `flags`: int :param `startFrom`: :type `startFrom`: int :param `specifiedLevel`: :type `specifiedLevel`: int :rtype: `bool` :html:`

` .. method:: SetMargins(self, *args, **kw) Attempts to set the control margins. When margins are given as :ref:`wx.Point`, x indicates the left and y the top margin. Use -1 to indicate that an existing value should be used. :returns: ``True`` if setting of all requested margins was successful. .. versionadded:: 2.9.1 |overload| Overloaded Implementations: :html:`

` **SetMargins** `(self, pt)` :param `pt`: :type `pt`: wx.Point :rtype: `bool` :html:`

` **SetMargins** `(self, left, top=-1)` :param `left`: :type `left`: int :param `top`: :type `top`: int :rtype: `bool` :html:`

` .. method:: SetMaxLength(self, len) Sets the maximum number of characters that may be entered in a single line text control. For compatibility only; currently does nothing. :param `len`: :type `len`: long .. method:: SetModified(self, modified) :param `modified`: :type `modified`: bool .. method:: SetPreDrag(self, pd) Set if we're trying to start Drag'n'Drop. :param `pd`: :type `pd`: bool .. method:: SetProperties(self, range, properties, flags=RICHTEXT_SETPROPERTIES_WITH_UNDO) Sets the properties for the given range, passing flags to determine how the attributes are set. You can merge properties or replace them. The end point of range is specified as the last character position of the span of text, plus one. So, for example, to set the properties for a character at position 5, use the range (5,6). `flags` may contain a bit list of the following values: - ``RICHTEXT_SETSPROPERTIES_NONE``: no flag. - ``wx.richtext.RICHTEXT_SETPROPERTIES_WITH_UNDO``: specifies that this operation should be undoable. - ``wx.richtext.RICHTEXT_SETPROPERTIES_PARAGRAPHS_ONLY``: specifies that the properties should only be applied to paragraphs, and not the content. - ``wx.richtext.RICHTEXT_SETPROPERTIES_CHARACTERS_ONLY``: specifies that the properties should only be applied to characters, and not the paragraph. - ``wx.richtext.RICHTEXT_SETPROPERTIES_RESET``: resets (clears) the existing properties before applying the new properties. - ``wx.richtext.RICHTEXT_SETPROPERTIES_REMOVE``: removes the specified properties. :param `range`: :type `range`: wx.richtext.RichTextRange :param `properties`: :type `properties`: wx.richtext.RichTextProperties :param `flags`: :type `flags`: int :rtype: `bool` .. method:: SetScale(self, scale, refresh=False) Sets an overall scale factor for displaying and editing the content. :param `scale`: :type `scale`: float :param `refresh`: :type `refresh`: bool .. method:: SetSelection(self, *args, **kw) Sets the selection to the given range. The end point of range is specified as the last character position of the span of text, plus one. So, for example, to set the selection for a character at position 5, use the range (5,6). |overload| Overloaded Implementations: :html:`

` **SetSelection** `(self, from_, to_)` :param `from_`: :type `from_`: long :param `to_`: :type `to_`: long :html:`

` **SetSelection** `(self, sel)` :param `sel`: :type `sel`: wx.richtext.RichTextSelection :html:`

` .. method:: SetSelectionAnchor(self, anchor) Sets an anchor so we know how to extend the selection. It's a caret position since it's between two characters. :param `anchor`: :type `anchor`: long .. method:: SetSelectionAnchorObject(self, anchor) Sets the anchor object if selecting multiple containers. :param `anchor`: :type `anchor`: wx.richtext.RichTextObject .. method:: SetSelectionRange(self, range) Sets the selection to the given range. The end point of range is specified as the last character position of the span of text, plus one. So, for example, to set the selection for a character at position 5, use the range (5,6). :param `range`: :type `range`: wx.richtext.RichTextRange .. method:: SetStyle(self, *args, **kw) |overload| Overloaded Implementations: :html:`

` **SetStyle** `(self, start, end, style)` Sets the attributes for the given range. The end point of range is specified as the last character position of the span of text, plus one. So, for example, to set the style for a character at position 5, use the range (5,6). :param `start`: :type `start`: long :param `end`: :type `end`: long :param `style`: :type `style`: wx.TextAttr :rtype: `bool` :html:`

` **SetStyle** `(self, start, end, style)` Sets the attributes for the given range. The end point of range is specified as the last character position of the span of text, plus one. So, for example, to set the style for a character at position 5, use the range (5,6). :param `start`: :type `start`: long :param `end`: :type `end`: long :param `style`: :type `style`: wx.richtext.RichTextAttr :rtype: `bool` :html:`

` **SetStyle** `(self, range, style)` Sets the attributes for the given range. The end point of range is specified as the last character position of the span of text, plus one. So, for example, to set the style for a character at position 5, use the range (5,6). :param `range`: :type `range`: wx.richtext.RichTextRange :param `style`: :type `style`: wx.TextAttr :rtype: `bool` :html:`

` **SetStyle** `(self, range, style)` Sets the attributes for the given range. The end point of range is specified as the last character position of the span of text, plus one. So, for example, to set the style for a character at position 5, use the range (5,6). :param `range`: :type `range`: wx.richtext.RichTextRange :param `style`: :type `style`: wx.richtext.RichTextAttr :rtype: `bool` :html:`

` **SetStyle** `(self, obj, textAttr, flags=RICHTEXT_SETSTYLE_WITH_UNDO)` Sets the attributes for a single object. :param `obj`: :type `obj`: wx.richtext.RichTextObject :param `textAttr`: :type `textAttr`: wx.richtext.RichTextAttr :param `flags`: :type `flags`: int :html:`

` .. method:: SetStyleEx(self, range, style, flags=RICHTEXT_SETSTYLE_WITH_UNDO) Sets the attributes for the given range, passing flags to determine how the attributes are set. The end point of range is specified as the last character position of the span of text, plus one. So, for example, to set the style for a character at position 5, use the range (5,6). `flags` may contain a bit list of the following values: - ``wx.richtext.RICHTEXT_SETSTYLE_NONE``: no style flag. - ``wx.richtext.RICHTEXT_SETSTYLE_WITH_UNDO``: specifies that this operation should be undoable. - ``wx.richtext.RICHTEXT_SETSTYLE_OPTIMIZE``: specifies that the style should not be applied if the combined style at this point is already the style in question. - ``wx.richtext.RICHTEXT_SETSTYLE_PARAGRAPHS_ONLY``: specifies that the style should only be applied to paragraphs, and not the content. This allows content styling to be preserved independently from that of e.g. a named paragraph style. - ``wx.richtext.RICHTEXT_SETSTYLE_CHARACTERS_ONLY``: specifies that the style should only be applied to characters, and not the paragraph. This allows content styling to be preserved independently from that of e.g. a named paragraph style. - ``wx.richtext.RICHTEXT_SETSTYLE_RESET``: resets (clears) the existing style before applying the new style. - ``wx.richtext.RICHTEXT_SETSTYLE_REMOVE``: removes the specified style. Only the style flags are used in this operation. :param `range`: :type `range`: wx.richtext.RichTextRange :param `style`: :type `style`: wx.richtext.RichTextAttr :param `flags`: :type `flags`: int :rtype: `bool` .. method:: SetStyleSheet(self, styleSheet) Sets the style sheet associated with the control. A style sheet allows named character and paragraph styles to be applied. :param `styleSheet`: :type `styleSheet`: wx.richtext.RichTextStyleSheet .. method:: SetTextCursor(self, cursor) Sets the text (normal) cursor. :param `cursor`: :type `cursor`: wx.Cursor .. method:: SetURLCursor(self, cursor) Sets the cursor to be used over URLs. :param `cursor`: :type `cursor`: wx.Cursor .. method:: SetValue(self, value) Replaces existing content with the given text. :param `value`: :type `value`: string .. method:: SetupScrollbars(self, atTop=False) A helper function setting up scrollbars, for example after a resize. :param `atTop`: :type `atTop`: bool .. method:: ShouldInheritColours(self) Return ``True`` from here to allow the colours of this window to be changed by :meth:`InheritAttributes` . Returning ``False`` forbids inheriting them from the parent window. The base class version returns ``False``, but this method is overridden in :ref:`wx.Control` where it returns ``True``. :rtype: `bool` .. method:: ShowContextMenu(self, menu, pt, addPropertyCommands) Shows the given context menu, optionally adding appropriate property-editing commands for the current position in the object hierarchy. :param `menu`: :type `menu`: wx.Menu :param `pt`: :type `pt`: wx.Point :param `addPropertyCommands`: :type `addPropertyCommands`: bool :rtype: `bool` .. method:: ShowPosition(self, pos) Scrolls the buffer so that the given position is in view. :param `pos`: :type `pos`: long .. method:: StartCellSelection(self, table, newCell) Starts selecting table cells. :param `table`: :type `table`: wx.richtext.RichTextTable :param `newCell`: :type `newCell`: wx.richtext.RichTextParagraphLayoutBox :rtype: `bool` .. method:: StoreFocusObject(self, obj) Setter for m_focusObject. :param `obj`: :type `obj`: wx.richtext.RichTextParagraphLayoutBox .. method:: SuppressingUndo(self) Returns ``True`` if undo history suppression is on. :rtype: `bool` .. method:: Undo(self) Undoes the command at the top of the command history, if there is one. .. method:: WordLeft(self, noPages=1, flags=0) Moves a number of words to the left. :param `noPages`: :type `noPages`: int :param `flags`: :type `flags`: int :rtype: `bool` .. method:: WordRight(self, noPages=1, flags=0) Move a number of words to the right. :param `noPages`: :type `noPages`: int :param `flags`: :type `flags`: int :rtype: `bool` .. method:: WriteField(self, fieldType, properties, textAttr=RichTextAttr()) Writes a field at the current insertion point. :param `fieldType`: The field type, matching an existing field type definition. :type `fieldType`: string :param `properties`: Extra data for the field. :type `properties`: wx.richtext.RichTextProperties :param `textAttr`: Optional attributes. :type `textAttr`: wx.richtext.RichTextAttr :rtype: :ref:`wx.richtext.RichTextField` .. seealso:: :ref:`wx.richtext.RichTextField`, :ref:`wx.richtext.RichTextFieldType`, :ref:`wx.richtext.RichTextFieldTypeStandard` .. method:: WriteImage(self, *args, **kw) |overload| Overloaded Implementations: :html:`

` **WriteImage** `(self, image, bitmapType=BITMAP_TYPE_PNG, textAttr=RichTextAttr())` Write a bitmap or image at the current insertion point. Supply an optional type to use for internal and file storage of the raw data. :param `image`: :type `image`: wx.Image :param `bitmapType`: :type `bitmapType`: wx.BitmapType :param `textAttr`: :type `textAttr`: wx.richtext.RichTextAttr :rtype: `bool` :html:`

` **WriteImage** `(self, bitmap, bitmapType=BITMAP_TYPE_PNG, textAttr=RichTextAttr())` Write a bitmap or image at the current insertion point. Supply an optional type to use for internal and file storage of the raw data. :param `bitmap`: :type `bitmap`: wx.Bitmap :param `bitmapType`: :type `bitmapType`: wx.BitmapType :param `textAttr`: :type `textAttr`: wx.richtext.RichTextAttr :rtype: `bool` :html:`

` **WriteImage** `(self, filename, bitmapType, textAttr=RichTextAttr())` Loads an image from a file and writes it at the current insertion point. :param `filename`: :type `filename`: string :param `bitmapType`: :type `bitmapType`: wx.BitmapType :param `textAttr`: :type `textAttr`: wx.richtext.RichTextAttr :rtype: `bool` :html:`

` **WriteImage** `(self, imageBlock, textAttr=RichTextAttr())` Writes an image block at the current insertion point. :param `imageBlock`: :type `imageBlock`: wx.richtext.RichTextImageBlock :param `textAttr`: :type `textAttr`: wx.richtext.RichTextAttr :rtype: `bool` :html:`

` .. method:: WriteTable(self, rows, cols, tableAttr=RichTextAttr(), cellAttr=RichTextAttr()) Write a table at the current insertion point, returning the table. You can then call :meth:`SetFocusObject` to set the focus to the new object. :param `rows`: :type `rows`: int :param `cols`: :type `cols`: int :param `tableAttr`: :type `tableAttr`: wx.richtext.RichTextAttr :param `cellAttr`: :type `cellAttr`: wx.richtext.RichTextAttr :rtype: :ref:`wx.richtext.RichTextTable` .. method:: WriteText(self, text) Writes text at the current position. :param `text`: :type `text`: string .. method:: WriteTextBox(self, textAttr=RichTextAttr()) Write a text box at the current insertion point, returning the text box. You can then call :meth:`SetFocusObject` to set the focus to the new object. :param `textAttr`: :type `textAttr`: wx.richtext.RichTextAttr :rtype: :ref:`wx.richtext.RichTextBox` .. method:: XYToPosition(self, x, y) Translates from column and line number to position. :param `x`: :type `x`: long :param `y`: :type `y`: long :rtype: `long` .. attribute:: BasicStyle See :meth:`~wx.richtext.RichTextCtrl.GetBasicStyle` and :meth:`~wx.richtext.RichTextCtrl.SetBasicStyle` .. attribute:: Buffer See :meth:`~wx.richtext.RichTextCtrl.GetBuffer` .. attribute:: CaretAtLineStart See :meth:`~wx.richtext.RichTextCtrl.GetCaretAtLineStart` and :meth:`~wx.richtext.RichTextCtrl.SetCaretAtLineStart` .. attribute:: CaretPosition See :meth:`~wx.richtext.RichTextCtrl.GetCaretPosition` and :meth:`~wx.richtext.RichTextCtrl.SetCaretPosition` .. attribute:: CaretPositionForDefaultStyle See :meth:`~wx.richtext.RichTextCtrl.GetCaretPositionForDefaultStyle` and :meth:`~wx.richtext.RichTextCtrl.SetCaretPositionForDefaultStyle` .. attribute:: CommandProcessor See :meth:`~wx.richtext.RichTextCtrl.GetCommandProcessor` .. attribute:: ContextMenu See :meth:`~wx.richtext.RichTextCtrl.GetContextMenu` and :meth:`~wx.richtext.RichTextCtrl.SetContextMenu` .. attribute:: ContextMenuPropertiesInfo See :meth:`~wx.richtext.RichTextCtrl.GetContextMenuPropertiesInfo` .. attribute:: DefaultStyle See :meth:`~wx.richtext.RichTextCtrl.GetDefaultStyle` and :meth:`~wx.richtext.RichTextCtrl.SetDefaultStyle` .. attribute:: DefaultStyleEx See :meth:`~wx.richtext.RichTextCtrl.GetDefaultStyleEx` .. attribute:: DelayedImageLoading See :meth:`~wx.richtext.RichTextCtrl.GetDelayedImageLoading` .. attribute:: DelayedImageProcessingRequired See :meth:`~wx.richtext.RichTextCtrl.GetDelayedImageProcessingRequired` and :meth:`~wx.richtext.RichTextCtrl.SetDelayedImageProcessingRequired` .. attribute:: DelayedImageProcessingTime See :meth:`~wx.richtext.RichTextCtrl.GetDelayedImageProcessingTime` and :meth:`~wx.richtext.RichTextCtrl.SetDelayedImageProcessingTime` .. attribute:: DelayedLayoutThreshold See :meth:`~wx.richtext.RichTextCtrl.GetDelayedLayoutThreshold` and :meth:`~wx.richtext.RichTextCtrl.SetDelayedLayoutThreshold` .. attribute:: DimensionScale See :meth:`~wx.richtext.RichTextCtrl.GetDimensionScale` and :meth:`~wx.richtext.RichTextCtrl.SetDimensionScale` .. attribute:: DragStartPoint See :meth:`~wx.richtext.RichTextCtrl.GetDragStartPoint` and :meth:`~wx.richtext.RichTextCtrl.SetDragStartPoint` .. attribute:: DragStartTime See :meth:`~wx.richtext.RichTextCtrl.GetDragStartTime` and :meth:`~wx.richtext.RichTextCtrl.SetDragStartTime` .. attribute:: Dragging See :meth:`~wx.richtext.RichTextCtrl.GetDragging` and :meth:`~wx.richtext.RichTextCtrl.SetDragging` .. attribute:: Filename See :meth:`~wx.richtext.RichTextCtrl.GetFilename` and :meth:`~wx.richtext.RichTextCtrl.SetFilename` .. attribute:: FirstVisiblePoint See :meth:`~wx.richtext.RichTextCtrl.GetFirstVisiblePoint` .. attribute:: FirstVisiblePosition See :meth:`~wx.richtext.RichTextCtrl.GetFirstVisiblePosition` .. attribute:: FocusObject See :meth:`~wx.richtext.RichTextCtrl.GetFocusObject` and :meth:`~wx.richtext.RichTextCtrl.SetFocusObject` .. attribute:: FontScale See :meth:`~wx.richtext.RichTextCtrl.GetFontScale` and :meth:`~wx.richtext.RichTextCtrl.SetFontScale` .. attribute:: FullLayoutRequired See :meth:`~wx.richtext.RichTextCtrl.GetFullLayoutRequired` and :meth:`~wx.richtext.RichTextCtrl.SetFullLayoutRequired` .. attribute:: FullLayoutSavedPosition See :meth:`~wx.richtext.RichTextCtrl.GetFullLayoutSavedPosition` and :meth:`~wx.richtext.RichTextCtrl.SetFullLayoutSavedPosition` .. attribute:: FullLayoutTime See :meth:`~wx.richtext.RichTextCtrl.GetFullLayoutTime` and :meth:`~wx.richtext.RichTextCtrl.SetFullLayoutTime` .. attribute:: HandlerFlags See :meth:`~wx.richtext.RichTextCtrl.GetHandlerFlags` and :meth:`~wx.richtext.RichTextCtrl.SetHandlerFlags` .. attribute:: Hint See :meth:`~wx.richtext.RichTextCtrl.GetHint` and :meth:`~wx.richtext.RichTextCtrl.SetHint` .. attribute:: ImagesEnabled See :meth:`~wx.richtext.RichTextCtrl.GetImagesEnabled` .. attribute:: InsertionPoint See :meth:`~wx.richtext.RichTextCtrl.GetInsertionPoint` and :meth:`~wx.richtext.RichTextCtrl.SetInsertionPoint` .. attribute:: InternalSelectionRange See :meth:`~wx.richtext.RichTextCtrl.GetInternalSelectionRange` and :meth:`~wx.richtext.RichTextCtrl.SetInternalSelectionRange` .. attribute:: LastPosition See :meth:`~wx.richtext.RichTextCtrl.GetLastPosition` .. attribute:: Margins See :meth:`~wx.richtext.RichTextCtrl.GetMargins` and :meth:`~wx.richtext.RichTextCtrl.SetMargins` .. attribute:: NumberOfLines See :meth:`~wx.richtext.RichTextCtrl.GetNumberOfLines` .. attribute:: PreDrag See :meth:`~wx.richtext.RichTextCtrl.GetPreDrag` and :meth:`~wx.richtext.RichTextCtrl.SetPreDrag` .. attribute:: Scale See :meth:`~wx.richtext.RichTextCtrl.GetScale` and :meth:`~wx.richtext.RichTextCtrl.SetScale` .. attribute:: Selection See :meth:`~wx.richtext.RichTextCtrl.GetSelection` and :meth:`~wx.richtext.RichTextCtrl.SetSelection` .. attribute:: SelectionAnchor See :meth:`~wx.richtext.RichTextCtrl.GetSelectionAnchor` and :meth:`~wx.richtext.RichTextCtrl.SetSelectionAnchor` .. attribute:: SelectionAnchorObject See :meth:`~wx.richtext.RichTextCtrl.GetSelectionAnchorObject` and :meth:`~wx.richtext.RichTextCtrl.SetSelectionAnchorObject` .. attribute:: SelectionRange See :meth:`~wx.richtext.RichTextCtrl.GetSelectionRange` and :meth:`~wx.richtext.RichTextCtrl.SetSelectionRange` .. attribute:: StringSelection See :meth:`~wx.richtext.RichTextCtrl.GetStringSelection` .. attribute:: StyleSheet See :meth:`~wx.richtext.RichTextCtrl.GetStyleSheet` and :meth:`~wx.richtext.RichTextCtrl.SetStyleSheet` .. attribute:: TextCursor See :meth:`~wx.richtext.RichTextCtrl.GetTextCursor` and :meth:`~wx.richtext.RichTextCtrl.SetTextCursor` .. attribute:: URLCursor See :meth:`~wx.richtext.RichTextCtrl.GetURLCursor` and :meth:`~wx.richtext.RichTextCtrl.SetURLCursor` .. attribute:: Value See :meth:`~wx.richtext.RichTextCtrl.GetValue` and :meth:`~wx.richtext.RichTextCtrl.SetValue` .. attribute:: VerticalScrollbarEnabled See :meth:`~wx.richtext.RichTextCtrl.GetVerticalScrollbarEnabled` .. attribute:: VirtualAttributesEnabled See :meth:`~wx.richtext.RichTextCtrl.GetVirtualAttributesEnabled`