Phoenix Logo

phoenix_title wx.stc.StyledTextCtrl

A wxWidgets implementation of the Scintilla source code editing component.

As well as features found in standard text editing components, Scintilla includes features especially useful when editing and debugging source code. These include support for syntax styling, error indicators, code completion and call tips.

The selection margin can contain markers like those used in debuggers to indicate breakpoints and the current line. Styling choices are more open than with many editors, allowing the use of proportional fonts, bold and italics, multiple foreground and background colours and multiple fonts.

wx.stc.StyledTextCtrl is a 1 to 1 mapping of “raw” scintilla interface, whose documentation can be found in the Scintilla website (http://www.scintilla.org/).

events Events Emitted by this Class

Handlers bound for the following event types will receive a wx.stc.StyledTextEvent parameter.

  • EVT_STC_CHANGE(id, fn): TOWRITE
  • EVT_STC_STYLENEEDED(id, fn): TOWRITE
  • EVT_STC_CHARADDED(id, fn): TOWRITE
  • EVT_STC_SAVEPOINTREACHED(id, fn): TOWRITE
  • EVT_STC_SAVEPOINTLEFT(id, fn): TOWRITE
  • EVT_STC_ROMODIFYATTEMPT(id, fn): TOWRITE
  • EVT_STC_KEY(id, fn): TOWRITE
  • EVT_STC_DOUBLECLICK(id, fn): TOWRITE
  • EVT_STC_UPDATEUI(id, fn): TOWRITE
  • EVT_STC_MODIFIED(id, fn): TOWRITE
  • EVT_STC_MACRORECORD(id, fn): TOWRITE
  • EVT_STC_MARGINCLICK(id, fn): TOWRITE
  • EVT_STC_NEEDSHOWN(id, fn): TOWRITE
  • EVT_STC_PAINTED(id, fn): TOWRITE
  • EVT_STC_USERLISTSELECTION(id, fn): TOWRITE
  • EVT_STC_URIDROPPED(id, fn): TOWRITE
  • EVT_STC_DWELLSTART(id, fn): TOWRITE
  • EVT_STC_DWELLEND(id, fn): TOWRITE
  • EVT_STC_START_DRAG(id, fn): TOWRITE
  • EVT_STC_DRAG_OVER(id, fn): TOWRITE
  • EVT_STC_DO_DROP(id, fn): TOWRITE
  • EVT_STC_ZOOM(id, fn): TOWRITE
  • EVT_STC_HOTSPOT_CLICK(id, fn): TOWRITE
  • EVT_STC_HOTSPOT_DCLICK(id, fn): TOWRITE
  • EVT_STC_CALLTIP_CLICK(id, fn): TOWRITE
  • EVT_STC_AUTOCOMP_SELECTION(id, fn): TOWRITE
  • EVT_STC_INDICATOR_CLICK(id, fn): TOWRITE
  • EVT_STC_INDICATOR_RELEASE(id, fn): TOWRITE
  • EVT_STC_AUTOCOMP_CANCELLED(id, fn): TOWRITE
  • EVT_STC_AUTOCOMP_CHAR_DELETED(id, fn): TOWRITE
  • EVT_STC_HOTSPOT_RELEASE_CLICK(id, fn): TOWRITE

class_hierarchy Class Hierarchy

Inheritance diagram for class StyledTextCtrl:


method_summary Methods Summary

__init__ Ctor.
AddRefDocument Extend life of document.
AddSelection Add a selection.
AddStyledText Add array of cells to document.
AddText Add text to the document at current position.
AddTextRaw Add text to the document at current position.
AddUndoAction Add a container action to the undo stack.
Allocate Enlarge the document to a particular size of text bytes.
AnnotationClearAll Clear the annotations from all lines.
AnnotationClearLine Clear annotations from the given line.
AnnotationGetLines Get the number of annotation lines for a line.
AnnotationGetStyle Get the style number for the annotations for a line.
AnnotationGetStyleOffset Get the start of the range of style numbers used for annotations.
AnnotationGetStyles Get the annotation styles for a line.
AnnotationGetText Get the annotation text for a line.
AnnotationGetVisible Get the visibility for the annotations for a view.
AnnotationSetStyle Set the style number for the annotations for a line.
AnnotationSetStyleOffset Get the start of the range of style numbers used for annotations.
AnnotationSetStyles Set the annotation styles for a line.
AnnotationSetText Set the annotation text for a line.
AnnotationSetVisible Set the visibility for the annotations for a view.
AppendText Append a string to the end of the document without changing the selection.
AppendTextRaw Append a string to the end of the document without changing the selection.
AutoCompActive Is there an auto-completion list visible?
AutoCompCancel Remove the auto-completion list from the screen.
AutoCompComplete User has selected an item so remove the list and insert the selection.
AutoCompGetAutoHide Retrieve whether or not autocompletion is hidden automatically when nothing matches.
AutoCompGetCancelAtStart Retrieve whether auto-completion cancelled by backspacing before start.
AutoCompGetCaseInsensitiveBehaviour Get auto-completion case insensitive behaviour.
AutoCompGetChooseSingle Retrieve whether a single item auto-completion list automatically choose the item.
AutoCompGetCurrent Get currently selected item position in the auto-completion list.
AutoCompGetDropRestOfWord Retrieve whether or not autocompletion deletes any word characters after the inserted text upon completion.
AutoCompGetIgnoreCase Retrieve state of ignore case flag.
AutoCompGetMaxHeight Set the maximum height, in rows, of auto-completion and user lists.
AutoCompGetMaxWidth Get the maximum width, in characters, of auto-completion and user lists.
AutoCompGetSeparator Retrieve the auto-completion list separator character.
AutoCompGetTypeSeparator Retrieve the auto-completion list type-separator character.
AutoCompPosStart Retrieve the position of the caret when the auto-completion list was displayed.
AutoCompSelect Select the item in the auto-completion list that starts with a string.
AutoCompSetAutoHide Set whether or not autocompletion is hidden automatically when nothing matches.
AutoCompSetCancelAtStart Should the auto-completion list be cancelled if the user backspaces to a position before where the box was created.
AutoCompSetCaseInsensitiveBehaviour Set auto-completion case insensitive behaviour to either prefer case-sensitive matches or have no preference.
AutoCompSetChooseSingle Should a single item auto-completion list automatically choose the item.
AutoCompSetDropRestOfWord Set whether or not autocompletion deletes any word characters after the inserted text upon completion.
AutoCompSetFillUps Define a set of characters that when typed will cause the autocompletion to choose the selected item.
AutoCompSetIgnoreCase Set whether case is significant when performing auto-completion searches.
AutoCompSetMaxHeight Set the maximum height, in rows, of auto-completion and user lists.
AutoCompSetMaxWidth Set the maximum width, in characters, of auto-completion and user lists.
AutoCompSetSeparator Change the separator character in the string setting up an auto-completion list.
AutoCompSetTypeSeparator Change the type-separator character in the string setting up an auto-completion list.
AutoCompShow Display a auto-completion list.
AutoCompStops Define a set of character that when typed cancel the auto-completion list.
AutoComplete Call this function to enable auto-completion of the text typed in a single-line text control using the given choices.
AutoCompleteDirectories Call this function to enable auto-completion of the text using the file system directories.
AutoCompleteFileNames Call this function to enable auto-completion of the text typed in a single-line text control using all valid file system paths.
BackTab Dedent the selected lines.
BeginUndoAction Start a sequence of actions that is undone and redone as a unit.
BraceBadLight Highlight the character at a position indicating there is no matching brace.
BraceBadLightIndicator Use specified indicator to highlight non matching brace instead of changing its style.
BraceHighlight Highlight the characters at two positions.
BraceHighlightIndicator Use specified indicator to highlight matching braces instead of changing their style.
BraceMatch Find the position of a matching brace or INVALID_POSITION if no match.
CallTipActive Is there an active call tip?
CallTipCancel Remove the call tip from the screen.
CallTipPosAtStart Retrieve the position where the caret was before displaying the call tip.
CallTipSetBackground Set the background colour for the call tip.
CallTipSetForeground Set the foreground colour for the call tip.
CallTipSetForegroundHighlight Set the foreground colour for the highlighted part of the call tip.
CallTipSetHighlight Highlight a segment of the definition.
CallTipSetPosition Set position of calltip, above or below text.
CallTipShow Show a call tip containing a definition near position pos.
CallTipUseStyle Enable use of STYLE_CALLTIP and set call tip tab size in pixels.
CanCopy Returns True if the selection can be copied to the clipboard.
CanCut Returns True if the selection can be cut to the clipboard.
CanPaste Will a paste succeed?
CanRedo Are there any redoable actions in the undo history?
CanUndo Are there any undoable actions in the undo history?
Cancel Cancel any modes such as call tip or auto-completion list display.
ChangeLexerState Indicate that the internal state of a lexer has changed over a range and therefore there may be a need to redraw.
ChangeValue Sets the new text control value.
CharLeft Move caret left one character.
CharLeftExtend Move caret left one character extending selection to new caret position.
CharLeftRectExtend Move caret left one character, extending rectangular selection to new caret position.
CharPositionFromPoint Find the position of a character from a point within the window.
CharPositionFromPointClose Find the position of a character from a point within the window.
CharRight Move caret right one character.
CharRightExtend Move caret right one character extending selection to new caret position.
CharRightRectExtend Move caret right one character, extending rectangular selection to new caret position.
ChooseCaretX Set the last x chosen value to be the caret x position.
Clear Clear the selection.
ClearAll Delete all text in the document.
ClearDocumentStyle Set all style bytes to 0, remove all folding information.
ClearRegisteredImages Clear all the registered images.
ClearSelections Clear selections to a single empty stream selection.
CmdKeyAssign When key+modifier combination km is pressed perform msg.
CmdKeyClear When key+modifier combination km is pressed do nothing.
CmdKeyClearAll Drop all key mappings.
CmdKeyExecute Perform one of the operations defined by the STC_CMD_ constants.
Colourise Colourise a segment of the document using the current lexing language.
ContractedFoldNext Find the next line at or after lineStart that is a contracted fold header line.
ConvertEOLs Convert all line endings in the document to one mode.
Copy Copy the selection to the clipboard.
CopyAllowLine Copy the selection, if selection empty copy the line with the caret.
CopyRange Copy a range of text to the clipboard.
CopyText Copy argument text to the clipboard.
CountCharacters Count characters between two positions.
Create Create the UI elements for a STC that was created with the default constructor.
CreateDocument Create a new document object.
CreateLoader Create an ILoader.
Cut Cut the selection to the clipboard.
DelLineLeft Delete back from the current position to the start of the line.
DelLineRight Delete forwards from the current position to the end of the line.
DelWordLeft Delete the word to the left of the caret.
DelWordRight Delete the word to the right of the caret.
DelWordRightEnd Delete the word to the right of the caret, but not the trailing non-word characters.
DeleteBack Delete the selection or if no selection, the character before the caret.
DeleteBackNotLine Delete the selection or if no selection, the character before the caret.
DeleteRange Delete a range of text in the document.
DescribeKeyWordSets Retrieve a ‘
DescribeProperty Describe a property.
DiscardEdits  
DoDragOver Allow for simulating a DnD DragOver.
DoDropText Allow for simulating a DnD DropText.
DocLineFromVisible Find the document line of a display line taking hidden lines into account.
DocumentEnd Move caret to last position in document.
DocumentEndExtend Move caret to last position in document extending selection to new caret position.
DocumentStart Move caret to first position in document.
DocumentStartExtend Move caret to first position in document extending selection to new caret position.
EditToggleOvertype Switch from insert to overtype mode or the reverse.
EmptyUndoBuffer Delete the undo history.
EndUndoAction End a sequence of actions that is undone and redone as a unit.
EnsureCaretVisible Ensure the caret is visible.
EnsureVisible Ensure a particular line is visible by expanding any header line hiding it.
EnsureVisibleEnforcePolicy Ensure a particular line is visible by expanding any header line hiding it.
FindColumn Find the position of a column on a line taking into account tabs and multi-byte characters.
FindText Find some text in the document.
FormFeed Insert a Form Feed character.
FormatRange On Windows, will draw the document into a display context such as a printer.
GetAdditionalCaretForeground Get the foreground colour of additional carets.
GetAdditionalCaretsBlink Whether additional carets will blink.
GetAdditionalCaretsVisible Whether additional carets are visible.
GetAdditionalSelAlpha Get the alpha of the selection.
GetAdditionalSelectionTyping Whether typing can be performed into multiple selections.
GetAllLinesVisible Are all lines visible?
GetAnchor Returns the position of the opposite end of the selection to the caret.
GetBackSpaceUnIndents Does a backspace pressed when caret is within indentation unindent?
GetBufferedDraw Is drawing done first into a buffer or direct to the screen?
GetCaretForeground Get the foreground colour of the caret.
GetCaretLineBackAlpha Get the background alpha of the caret line.
GetCaretLineBackground Get the colour of the background of the line containing the caret.
GetCaretLineVisible Is the background of the line containing the caret in a different colour?
GetCaretPeriod Get the time in milliseconds that the caret is on and off.
GetCaretSticky Can the caret preferred x position only be changed by explicit movement commands?
GetCaretStyle Returns the current style of the caret.
GetCaretWidth Returns the width of the insert mode caret.
GetCharAt Returns the character byte at the position.
GetCharacterPointer Compact the document buffer and return a read-only memoryview
GetCodePage Get the code page used to interpret the bytes of the document as characters.
GetColumn Retrieve the column number of a position, taking tab width into account.
GetControlCharSymbol Get the way control characters are displayed.
GetCurLine Retrieve the text of the line containing the caret.
GetCurLineRaw Retrieve the text of the line containing the caret.
GetCurrentLine Returns the line number of the line with the caret.
GetCurrentPos Returns the position of the caret.
GetDefaultStyle Returns the style currently used for the new text.
GetDocPointer Retrieve a pointer to the document object.
GetEOLMode Retrieve the current end of line mode - one of CRLF, CR, or LF.
GetEdgeColour Retrieve the colour used in edge indication.
GetEdgeColumn Retrieve the column number which text should be kept within.
GetEdgeMode Retrieve the edge highlight mode.
GetEndAtLastLine Retrieve whether the maximum scroll position has the last line at the bottom of the view.
GetEndStyled Retrieve the position of the last correctly styled character.
GetExtraAscent Get extra ascent for each line.
GetExtraDescent Get extra descent for each line.
GetFirstVisibleLine Retrieve the display line at the top of the display.
GetFoldExpanded Is a header line expanded?
GetFoldLevel Retrieve the fold level of a line.
GetFoldParent Find the parent line of a child line.
GetGapPosition Return a position which, to avoid performance costs, should not be within the range of a call to GetRangePointer.
GetHighlightGuide Get the highlighted indentation guide column.
GetHint Returns the current hint string.
GetHotspotActiveBackground Get the back colour for active hotspots.
GetHotspotActiveForeground Get the fore colour for active hotspots.
GetHotspotActiveUnderline Get whether underlining for active hotspots.
GetHotspotSingleLine Get the HotspotSingleLine property.
GetIdentifier Get the identifier.
GetIndent Retrieve indentation size.
GetIndentationGuides Are the indentation guides visible?
GetIndicatorCurrent Get the current indicator.
GetIndicatorValue Get the current indicator value.
GetInsertionPoint Returns the insertion point, or cursor, position.
GetKeysUnicode Are keys always interpreted as Unicode?
GetLastChild Find the last child line of a header line.
GetLastKeydownProcessed Can be used to prevent the EVT_CHAR handler from adding the char.
GetLastPosition Returns the zero based index of the last position in the text control, which is equal to the number of characters in the control.
GetLayoutCache Retrieve the degree of caching of layout information.
GetLength Returns the number of bytes in the document.
GetLexer Retrieve the lexing language of the document.
GetLibraryVersionInfo  
GetLine Retrieve the contents of a line.
GetLineCount Returns the number of lines in the document.
GetLineEndPosition Get the position after the last visible characters on a line.
GetLineIndentPosition Retrieve the position before the first non indentation character on a line.
GetLineIndentation Retrieve the number of columns that a line is indented.
GetLineLength  
GetLineRaw Retrieve the contents of a line.
GetLineSelEndPosition Retrieve the position of the end of the selection at the given line (INVALID_POSITION if no selection on this line).
GetLineSelStartPosition Retrieve the position of the start of the selection at the given line (INVALID_POSITION if no selection on this line).
GetLineState Retrieve the extra styling information for a line.
GetLineText  
GetLineVisible Is a line visible?
GetMainSelection Which selection is the main selection.
GetMarginCursor Retrieve the cursor shown in a margin.
GetMarginLeft Returns the size in pixels of the left margin.
GetMarginMask Retrieve the marker mask of a margin.
GetMarginOptions Get the margin options.
GetMarginRight Returns the size in pixels of the right margin.
GetMarginSensitive Retrieve the mouse click sensitivity of a margin.
GetMarginType Retrieve the type of a margin.
GetMarginWidth Retrieve the width of a margin in pixels.
GetMargins Returns the margins used by the control.
GetMarkerSymbolDefined Which symbol was defined for markerNumber with MarkerDefine.
GetMaxLineState Retrieve the last line number that has line state.
GetModEventMask Get which document modification events are sent to the container.
GetModify Is the document different from when it was last saved?
GetMouseDownCaptures Get whether mouse gets captured.
GetMouseDwellTime Retrieve the time the mouse must sit still to generate a mouse dwell event.
GetMultiPaste Retrieve the effect of pasting when there are multiple selections.
GetMultipleSelection Whether multiple selections can be made.
GetNumberOfLines  
GetOvertype Returns True if overtype mode is active otherwise False is returned.
GetPasteConvertEndings Get convert-on-paste setting.
GetPositionCacheSize How many entries are allocated to the position cache?
GetPrintColourMode Returns the print colour mode.
GetPrintMagnification Returns the print magnification.
GetPrintWrapMode Is printing line wrapped?
GetProperty Retrieve a ‘property’ value previously set with SetProperty.
GetPropertyExpanded Retrieve a ‘property’ value previously set with SetProperty, with ‘$()’ variable replacement on returned buffer.
GetPropertyInt Retrieve a ‘property’ value previously set with SetProperty, interpreted as an int AFTER any ‘$()’ variable replacement.
GetPunctuationChars Get the set of characters making up punctuation characters.
GetRange Returns the string containing the text starting in the positions from and up to to in the control.
GetRangePointer Return a read-only pointer to a range of characters in the
GetReadOnly In read-only mode?
GetRectangularSelectionAnchor  
GetRectangularSelectionAnchorVirtualSpace  
GetRectangularSelectionCaret  
GetRectangularSelectionCaretVirtualSpace  
GetRectangularSelectionModifier Get the modifier key used for rectangular selection.
GetSTCCursor Get cursor type.
GetSTCFocus Get internal focus flag.
GetScrollWidth Retrieve the document width assumed for scrolling.
GetScrollWidthTracking Retrieve whether the scroll width tracks wide lines.
GetSearchFlags Get the search flags used by SearchInTarget.
GetSelAlpha Get the alpha of the selection.
GetSelEOLFilled Is the selection end of line filled?
GetSelectedText Retrieve the selected text.
GetSelectedTextRaw Retrieve the selected text.
GetSelection Gets the current selection span.
GetSelectionEnd Returns the position at the end of the selection.
GetSelectionMode Get the mode of the current selection.
GetSelectionNAnchor  
GetSelectionNAnchorVirtualSpace  
GetSelectionNCaret  
GetSelectionNCaretVirtualSpace  
GetSelectionNEnd Returns the position at the end of the selection.
GetSelectionNStart Returns the position at the start of the selection.
GetSelectionStart Returns the position at the start of the selection.
GetSelections How many selections are there?
GetStatus Get error status.
GetStringSelection Gets the text currently selected in the control.
GetStyle  
GetStyleAt Returns the style byte at the position.
GetStyleBits Retrieve number of bits in style bytes used to hold the lexical state.
GetStyleBitsNeeded Retrieve the number of bits the current lexer needs for styling.
GetStyledText Retrieve a buffer of cells.
GetTabIndents Does a tab pressed when caret is within indentation indent?
GetTabWidth Retrieve the visible size of a tab.
GetTag Retrieve the value of a tag from a regular expression search.
GetTargetEnd Get the position that ends the target.
GetTargetStart Get the position that starts the target.
GetTechnology Get the tech.
GetText Retrieve all the text in the document.
GetTextLength Retrieve the number of characters in the document.
GetTextRange Retrieve a range of text.
GetTextRangeRaw Retrieve a range of text.
GetTextRaw Retrieve all the text in the document.
GetTwoPhaseDraw Is drawing done in two phases with backgrounds drawn before foregrounds?
GetUndoCollection Is undo history being collected?
GetUseHorizontalScrollBar Is the horizontal scroll bar visible?
GetUseTabs Retrieve whether tabs will be used in indentation.
GetUseVerticalScrollBar Is the vertical scroll bar visible?
GetValue Gets the contents of the control.
GetViewEOL Are the end of line characters visible?
GetViewWhiteSpace Are white space characters currently visible? Returns one of SCWS_ constants.
GetVirtualSpaceOptions  
GetWhitespaceChars Get the set of characters making up whitespace for when moving or selecting by word.
GetWhitespaceSize Get the size of the dots used to mark space characters.
GetWordChars Get the set of characters making up words for when moving or selecting by word.
GetWrapIndentMode Retrieve how wrapped sublines are placed.
GetWrapMode Retrieve whether text is word wrapped.
GetWrapStartIndent Retrive the start indent for wrapped lines.
GetWrapVisualFlags Retrive the display mode of visual flags for wrapped lines.
GetWrapVisualFlagsLocation Retrive the location of visual flags for wrapped lines.
GetXOffset  
GetZoom Retrieve the zoom level.
GotoLine Set caret to start of a line and ensure it is visible.
GotoPos Set caret to a position and ensure it is visible.
HideLines Make a range of lines invisible.
HideSelection Draw the selection in normal style or with selection highlighted.
HitTestPos  
HitTest  
Home Move caret to first position on line.
HomeDisplay Move caret to first position on display line.
HomeDisplayExtend Move caret to first position on display line extending selection to new caret position.
HomeExtend Move caret to first position on line extending selection to new caret position.
HomeRectExtend Move caret to first position on line, extending rectangular selection to new caret position.
HomeWrap These are like their namesakes Home(Extend)?, LineEnd(Extend)?, VCHome(Extend)? except they behave differently when word-wrap is enabled: They go first to the start / end of the display line, like (Home|LineEnd)Display The difference is that, the cursor is already at the point, it goes on to the start or end of the document line, as appropriate for (Home|LineEnd|VCHome)(Extend)?.
HomeWrapExtend  
IndicatorAllOnFor Are any indicators present at position?
IndicatorClearRange Turn a indicator off over a range.
IndicatorEnd Where does a particular indicator end?
IndicatorFillRange Turn a indicator on over a range.
IndicatorGetAlpha Get the alpha fill colour of the given indicator.
IndicatorGetForeground Retrieve the foreground colour of an indicator.
IndicatorGetOutlineAlpha Get the alpha outline colour of the given indicator.
IndicatorGetStyle Retrieve the style of an indicator.
IndicatorGetUnder Retrieve whether indicator drawn under or over text.
IndicatorSetAlpha Set the alpha fill colour of the given indicator.
IndicatorSetForeground Set the foreground colour of an indicator.
IndicatorSetOutlineAlpha Set the alpha outline colour of the given indicator.
IndicatorSetStyle Set an indicator to plain, squiggle or TT.
IndicatorSetUnder Set an indicator to draw under text or over(default).
IndicatorStart Where does a particular indicator start?
IndicatorValueAt What value does a particular indicator have at at a position?
InsertText Insert string at a position.
InsertTextRaw Insert string at a position.
IsEditable Returns True if the controls contents may be edited by user (note that it always can be changed by the program).
IsEmpty Returns True if the control is currently empty.
IsModified  
LineCopy Copy the line containing the caret.
LineCut Cut the line containing the caret.
LineDelete Delete the line containing the caret.
LineDown Move caret down one line.
LineDownExtend Move caret down one line extending selection to new caret position.
LineDownRectExtend Move caret down one line, extending rectangular selection to new caret position.
LineDuplicate Duplicate the current line.
LineEnd Move caret to last position on line.
LineEndDisplay Move caret to last position on display line.
LineEndDisplayExtend Move caret to last position on display line extending selection to new caret position.
LineEndExtend Move caret to last position on line extending selection to new caret position.
LineEndRectExtend Move caret to last position on line, extending rectangular selection to new caret position.
LineEndWrap  
LineEndWrapExtend  
LineFromPosition Retrieve the line containing a position.
LineLength How many characters are on a line, including end of line characters?
LineScroll Scroll horizontally and vertically.
LineScrollDown Scroll the document down, keeping the caret visible.
LineScrollUp Scroll the document up, keeping the caret visible.
LineTranspose Switch the current line with the previous.
LineUp Move caret up one line.
LineUpExtend Move caret up one line extending selection to new caret position.
LineUpRectExtend Move caret up one line, extending rectangular selection to new caret position.
LinesJoin Join the lines in the target.
LinesOnScreen Retrieves the number of lines completely visible.
LinesSplit Split the lines in the target into lines that are less wide than pixelWidth where possible.
LoadFile Load the contents of filename into the editor.
LowerCase Transform the selection to lower case.
MarginGetStyle Get the style number for the text margin for a line.
MarginGetStyleOffset Get the start of the range of style numbers used for margin text.
MarginGetStyles Get the styles in the text margin for a line.
MarginGetText Get the text in the text margin for a line.
MarginSetStyle Set the style number for the text margin for a line.
MarginSetStyleOffset Get the start of the range of style numbers used for margin text.
MarginSetStyles Set the style in the text margin for a line.
MarginSetText Set the text in the text margin for a line.
MarginTextClearAll Clear the margin text on all lines.
MarkDirty  
MarkerAdd Add a marker to a line, returning an ID which can be used to find or delete the marker.
MarkerAddSet Add a set of markers to a line.
MarkerDefine Set the symbol used for a particular marker number, and optionally the fore and background colours.
MarkerDefineBitmap Define a marker from a bitmap.
MarkerDefineRGBAImage Define a marker from RGBA data.
MarkerDelete Delete a marker from a line.
MarkerDeleteAll Delete all markers with a particular number from all lines.
MarkerDeleteHandle Delete a marker.
MarkerEnableHighlight Enable/disable highlight for current folding bloc (smallest one that contains the caret)
MarkerGet Get a bit mask of all the markers set on a line.
MarkerLineFromHandle Retrieve the line number at which a particular marker is located.
MarkerNext Find the next line at or after lineStart that includes a marker in mask.
MarkerPrevious Find the previous line before lineStart that includes a marker in mask.
MarkerSetAlpha Set the alpha used for a marker that is drawn in the text area, not the margin.
MarkerSetBackground Set the background colour used for a particular marker number.
MarkerSetBackgroundSelected Set the background colour used for a particular marker number when its folding block is selected.
MarkerSetForeground Set the foreground colour used for a particular marker number.
MoveCaretInsideView Move the caret inside current view if it’s not there already.
MoveSelectedLinesDown Move the selected lines down one line, shifting the line below before the selection.
MoveSelectedLinesUp Move the selected lines up one line, shifting the line above after the selection.
NewLine Insert a new line, may use a CRLF, CR or LF depending on EOL mode.
PageDown Move caret one page down.
PageDownExtend Move caret one page down extending selection to new caret position.
PageDownRectExtend Move caret one page down, extending rectangular selection to new caret position.
PageUp Move caret one page up.
PageUpExtend Move caret one page up extending selection to new caret position.
PageUpRectExtend Move caret one page up, extending rectangular selection to new caret position.
ParaDown Move caret between paragraphs (delimited by empty lines).
ParaDownExtend  
ParaUp  
ParaUpExtend  
Paste Paste the contents of the clipboard into the document replacing the selection.
PointFromPosition Retrieve the point in the window where a position is displayed.
PositionAfter Given a valid document position, return the next position taking code page into account.
PositionBefore Given a valid document position, return the previous position taking code page into account.
PositionFromLine Retrieve the position at the start of a line.
PositionFromPoint Find the position from a point within the window.
PositionFromPointClose Find the position from a point within the window but return INVALID_POSITION if not close to text.
PositionToCoords Converts given text position to client coordinates in pixels.
PositionToXY  
PrivateLexerCall For private communication between an application and a known lexer.
PropertyNames Retrieve a ‘
PropertyType Retrieve the type of a property.
RGBAImageSetHeight Set the height for future RGBA image data.
RGBAImageSetWidth Set the width for future RGBA image data.
Redo Redoes the next action on the undo history.
RegisterImage Register an image for use in autocompletion lists.
RegisterRGBAImage Register an RGBA image for use in autocompletion lists.
ReleaseDocument Release a reference to the document, deleting document if it fades to black.
Remove Removes the text starting at the first given position up to (but not including) the character at the last position.
Replace Replaces the text starting at the first position up to (but not including) the character at the last position with the given text.
ReplaceSelection Replace the selected text with the argument text.
ReplaceTarget Replace the target text with the argument text.
ReplaceTargetRE Replace the target text with the argument text after \d processing.
RotateSelection Set the main selection to the next selection.
SaveFile Write the contents of the editor to filename.
ScrollToColumn Scroll enough to make the given column visible.
ScrollToEnd Scroll to end of document.
ScrollToLine Scroll enough to make the given line visible.
ScrollToStart Scroll to start of document.
SearchAnchor Sets the current caret position to be the search anchor.
SearchInTarget Search for a counted string in the target and set the target to the found range.
SearchNext Find some text starting at the search anchor.
SearchPrev Find some text starting at the search anchor and moving backwards.
SelectAll Select all the text in the document.
SelectNone Deselects selected text in the control.
SelectionDuplicate Duplicate the selection.
SelectionIsRectangle Is the selection rectangular? The alternative is the more common stream selection.
SendMsg Send a message to Scintilla.
SetAdditionalCaretForeground Set the foreground colour of additional carets.
SetAdditionalCaretsBlink Set whether additional carets will blink.
SetAdditionalCaretsVisible Set whether additional carets are visible.
SetAdditionalSelAlpha Set the alpha of the selection.
SetAdditionalSelBackground Set the background colour of additional selections.
SetAdditionalSelForeground Set the foreground colour of additional selections.
SetAdditionalSelectionTyping Set whether typing can be performed into multiple selections.
SetAnchor Set the selection anchor to a position.
SetBackSpaceUnIndents Sets whether a backspace pressed when caret is within indentation unindents.
SetBufferedDraw If drawing is buffered then each line of text is drawn into a bitmap buffer before drawing it to the screen to avoid flicker.
SetCaretForeground Set the foreground colour of the caret.
SetCaretLineBackAlpha Set background alpha of the caret line.
SetCaretLineBackground Set the colour of the background of the line containing the caret.
SetCaretLineVisible Display the background of the line containing the caret in a different colour.
SetCaretPeriod Get the time in milliseconds that the caret is on and off.
SetCaretSticky Stop the caret preferred x position changing when the user types.
SetCaretStyle Set the style of the caret to be drawn.
SetCaretWidth Set the width of the insert mode caret.
SetCharsDefault Reset the set of characters for whitespace and word characters to the defaults.
SetCodePage Set the code page used to interpret the bytes of the document as characters.
SetControlCharSymbol Change the way control characters are displayed: If symbol is < 32, keep the drawn way, else, use the given character.
SetCurrentPos Sets the position of the caret.
SetDefaultStyle  
SetDocPointer Change the document object used.
SetEOLMode Set the current end of line mode.
SetEdgeColour Change the colour used in edge indication.
SetEdgeColumn Set the column number of the edge.
SetEdgeMode The edge may be displayed by a line (EDGE_LINE) or by highlighting text that goes beyond it (EDGE_BACKGROUND) or not displayed at all (EDGE_NONE).
SetEditable Makes the text item editable or read-only, overriding the wx.TE_READONLY flag.
SetEmptySelection Set caret to a position, while removing any existing selection.
SetEndAtLastLine Sets the scroll range so that maximum scroll position has the last line at the bottom of the view (default).
SetExtraAscent Set extra ascent for each line.
SetExtraDescent Set extra descent for each line.
SetFirstVisibleLine Scroll so that a display line is at the top of the display.
SetFoldExpanded Show the children of a header line.
SetFoldFlags Set some style options for folding.
SetFoldLevel Set the fold level of a line.
SetFoldMarginColour Set the colours used as a chequerboard pattern in the fold margin.
SetFoldMarginHiColour  
SetHScrollBar Set the horizontal scrollbar to use instead of the ont that’s built-in.
SetHighlightGuide Set the highlighted indentation guide column.
SetHint Sets a hint shown in an empty unfocused text control.
SetHotspotActiveBackground Set a back colour for active hotspots.
SetHotspotActiveForeground Set a fore colour for active hotspots.
SetHotspotActiveUnderline Enable / Disable underlining active hotspots.
SetHotspotSingleLine Limit hotspots to single line so hotspots on two lines don’t merge.
SetIdentifier Set the identifier reported as idFrom in notification messages.
SetIndent Set the number of spaces used for one level of indentation.
SetIndentationGuides Show or hide indentation guides.
SetIndicatorCurrent Set the indicator used for IndicatorFillRange and IndicatorClearRange.
SetIndicatorValue Set the value used for IndicatorFillRange.
SetInsertionPoint Sets the insertion point at the given position.
SetInsertionPointEnd Sets the insertion point at the end of the text control.
SetKeyWords Set up the key words used by the lexer.
SetKeysUnicode Always interpret keyboard input as Unicode.
SetLastKeydownProcessed  
SetLayoutCache Sets the degree of caching of layout information.
SetLexer Set the lexing language of the document.
SetLexerLanguage Set the lexing language of the document based on string name.
SetLineIndentation Change the indentation of a line to a number of columns.
SetLineState Used to hold extra styling information for each line.
SetMainSelection Set the main selection.
SetMarginCursor Set the cursor shown when the mouse is inside a margin.
SetMarginLeft Sets the size in pixels of the left margin.
SetMarginMask Set a mask that determines which markers are displayed in a margin.
SetMarginOptions Set the margin options.
SetMarginRight Sets the size in pixels of the right margin.
SetMarginSensitive Make a margin sensitive or insensitive to mouse clicks.
SetMarginType Set a margin to be either numeric or symbolic.
SetMarginWidth Set the width of a margin to a width expressed in pixels.
SetMargins Set the left and right margin in the edit area, measured in pixels.
SetMaxLength This function sets the maximum number of characters the user can enter into the control.
SetModEventMask Set which document modification events are sent to the container.
SetModified Marks the control as being modified by the user or not.
SetMouseDownCaptures Set whether the mouse is captured when its button is pressed.
SetMouseDwellTime Sets the time the mouse must sit still to generate a mouse dwell event.
SetMultiPaste Change the effect of pasting when there are multiple selections.
SetMultipleSelection Set whether multiple selections can be made.
SetOvertype Set to overtype (True) or insert mode.
SetPasteConvertEndings Enable/Disable convert-on-paste for line endings.
SetPositionCacheSize Set number of entries in position cache.
SetPrintColourMode Modify colours when printing for clearer printed text.
SetPrintMagnification Sets the print magnification added to the point size of each style for printing.
SetPrintWrapMode Set printing to line wrapped (SC_WRAP_WORD) or not line wrapped (SC_WRAP_NONE).
SetProperty Set up a value that may be used by a lexer for some optional feature.
SetPunctuationChars Set the set of characters making up punctuation characters Should be called after SetWordChars.
SetReadOnly Set to read only or read write.
SetRectangularSelectionAnchor  
SetRectangularSelectionAnchorVirtualSpace  
SetRectangularSelectionCaret  
SetRectangularSelectionCaretVirtualSpace  
SetRectangularSelectionModifier On GTK+, allow selecting the modifier key to use for mouse-based rectangular selection.
SetSTCCursor Sets the cursor to one of the SC_CURSOR values.
SetSTCFocus Change internal focus flag.
SetSavePoint Remember the current position in the undo history as the position at which the document was saved.
SetScrollWidth Sets the document width assumed for scrolling.
SetScrollWidthTracking Sets whether the maximum width line displayed is used to set scroll width.
SetSearchFlags Set the search flags used by SearchInTarget.
SetSelAlpha Set the alpha of the selection.
SetSelBackground Set the background colour of the main and additional selections and whether to use this setting.
SetSelEOLFilled Set the selection to have its end of line filled or not.
SetSelForeground Set the foreground colour of the main and additional selections and whether to use this setting.
SetSelection Selects the text starting at the first position up to (but not including) the character at the last position.
SetSelectionEnd Sets the position that ends the selection - this becomes the currentPosition.
SetSelectionMode Set the selection mode to stream (SC_SEL_STREAM) or rectangular (SC_SEL_RECTANGLE/SC_SEL_THIN) or by lines (SC_SEL_LINES).
SetSelectionNAnchor  
SetSelectionNAnchorVirtualSpace  
SetSelectionNCaret  
SetSelectionNCaretVirtualSpace  
SetSelectionNEnd Sets the position that ends the selection - this becomes the currentPosition.
SetSelectionNStart Sets the position that starts the selection - this becomes the anchor.
SetSelectionStart Sets the position that starts the selection - this becomes the anchor.
SetStatus Change error status - 0 = wx.OK.
SetStyle  
SetStyleBits Divide each styling byte into lexical class bits (default: 5) and indicator bits (default: 3).
SetStyleBytes Set the styles for a segment of the document.
SetStyling Change style from current styling position for length characters to a style and move the current styling position to after this newly styled segment.
SetTabIndents Sets whether a tab pressed when caret is within indentation indents.
SetTabWidth Change the visible size of a tab to be a multiple of the width of a space character.
SetTargetEnd Sets the position that ends the target which is used for updating the document without affecting the scroll position.
SetTargetStart Sets the position that starts the target which is used for updating the document without affecting the scroll position.
SetTechnology Set the technology used.
SetText Replace the contents of the document with the argument text.
SetTextRaw Replace the contents of the document with the argument text.
SetTwoPhaseDraw In twoPhaseDraw mode, drawing is performed in two phases, first the background and then the foreground.
SetUndoCollection Choose between collecting actions into the undo history and discarding them.
SetUseHorizontalScrollBar Show or hide the horizontal scroll bar.
SetUseTabs Indentation will only use space characters if useTabs is False, otherwise it will use a combination of tabs and spaces.
SetUseVerticalScrollBar Show or hide the vertical scroll bar.
SetVScrollBar Set the vertical scrollbar to use instead of the ont that’s built-in.
SetValue Sets the new text control value.
SetViewEOL Make the end of line characters visible or invisible.
SetViewWhiteSpace Make white space characters invisible, always visible or visible outside indentation.
SetVirtualSpaceOptions  
SetVisiblePolicy Set the way the display area is determined when a particular line is to be moved to by Find, FindNext, GotoLine, etc.
SetWhitespaceBackground Set the background colour of all whitespace and whether to use this setting.
SetWhitespaceChars Set the set of characters making up whitespace for when moving or selecting by word.
SetWhitespaceForeground Set the foreground colour of all whitespace and whether to use this setting.
SetWhitespaceSize Set the size of the dots used to mark space characters.
SetWordChars Set the set of characters making up words for when moving or selecting by word.
SetWrapIndentMode Sets how wrapped sublines are placed.
SetWrapMode Sets whether text is word wrapped.
SetWrapStartIndent Set the start indent for wrapped lines.
SetWrapVisualFlags Set the display mode of visual flags for wrapped lines.
SetWrapVisualFlagsLocation Set the location of visual flags for wrapped lines.
SetXCaretPolicy Set the way the caret is kept visible when going sideways.
SetXOffset Get and Set the xOffset (ie, horizontal scroll position).
SetYCaretPolicy Set the way the line the caret is on is kept visible.
SetZoom Set the zoom level.
ShowLines Make a range of lines visible.
ShowPosition  
StartRecord Start notifying the container of all key presses and commands.
StartStyling Set the current styling position to pos and the styling mask to mask.
StopRecord Stop notifying the container of all key presses and commands.
StutteredPageDown Move caret to bottom of page, or one page down if already at bottom of page.
StutteredPageDownExtend Move caret to bottom of page, or one page down if already at bottom of page, extending selection to new caret position.
StutteredPageUp Move caret to top of page, or one page up if already at top of page.
StutteredPageUpExtend Move caret to top of page, or one page up if already at top of page, extending selection to new caret position.
StyleClearAll Clear all the styles and make equivalent to the global default style.
StyleGetBackground Get the background colour of a style.
StyleGetBold Get is a style bold or not.
StyleGetCase Get is a style mixed case, or to force upper or lower case.
StyleGetChangeable Get is a style changeable or not (read only).
StyleGetCharacterSet Get the character set of the font in a style.
StyleGetEOLFilled Get is a style to have its end of line filled or not.
StyleGetFaceName Get the font facename of a style.
StyleGetFont Get the font of a style.
StyleGetForeground Get the foreground colour of a style.
StyleGetHotSpot Get is a style a hotspot or not.
StyleGetItalic Get is a style italic or not.
StyleGetSize Get the size of characters of a style.
StyleGetSizeFractional Get the size of characters of a style in points multiplied by 100.
StyleGetUnderline Get is a style underlined or not.
StyleGetVisible Get is a style visible or not.
StyleGetWeight Get the weight of characters of a style.
StyleResetDefault Reset the default style to its state at startup.
StyleSetBackground Set the background colour of a style.
StyleSetBold Set a style to be bold or not.
StyleSetCase Set a style to be mixed case, or to force upper or lower case.
StyleSetChangeable Set a style to be changeable or not (read only).
StyleSetCharacterSet Set the character set of the font in a style.
StyleSetEOLFilled Set a style to have its end of line filled or not.
StyleSetFaceName Set the font of a style.
StyleSetFont Set style size, face, bold, italic, and underline attributes from a wx.Font‘s attributes.
StyleSetFontAttr Set all font style attributes at once.
StyleSetFontEncoding Set the font encoding to be used by a style.
StyleSetForeground Set the foreground colour of a style.
StyleSetHotSpot Set a style to be a hotspot or not.
StyleSetItalic Set a style to be italic or not.
StyleSetSize Set the size of characters of a style.
StyleSetSizeFractional Set the size of characters of a style.
StyleSetSpec Extract style settings from a spec-string which is composed of one or more of the following comma separated elements
StyleSetUnderline Set a style to be underlined or not.
StyleSetVisible Set a style to be visible or not.
StyleSetWeight Set the weight of characters of a style.
SwapMainAnchorCaret Swap that caret and anchor of the main selection.
Tab If selection is empty or all on one line replace the selection with a tab character.
TargetFromSelection Make the target range start and end be the same as the selection range start and end.
TextHeight Retrieve the height of a particular line of text in pixels.
TextWidth Measure the pixel width of some text in a particular style.
ToggleCaretSticky Switch between sticky and non-sticky: meant to be bound to a key.
ToggleFold Switch a header line between expanded and contracted.
Undo Undo one action in the undo history.
UpperCase Transform the selection to upper case.
UsePopUp Set whether a pop up menu is displayed automatically when the user presses the wrong mouse button.
UserListShow Display a list of strings and send notification when user chooses one.
VCHome Move caret to before first visible character on line.
VCHomeExtend Like VCHome but extending selection to new caret position.
VCHomeRectExtend Move caret to before first visible character on line.
VCHomeWrap  
VCHomeWrapExtend  
VerticalCentreCaret Centre current line in window.
VisibleFromDocLine Find the display line of a document line taking hidden lines into account.
WordEndPosition Get position of end of word.
WordLeft Move caret left one word.
WordLeftEnd Move caret left one word, position cursor at end of word.
WordLeftEndExtend Move caret left one word, position cursor at end of word, extending selection to new caret position.
WordLeftExtend Move caret left one word extending selection to new caret position.
WordPartLeft Move to the previous change in capitalisation.
WordPartLeftExtend Move to the previous change in capitalisation extending selection to new caret position.
WordPartRight Move to the change next in capitalisation.
WordPartRightExtend Move to the next change in capitalisation extending selection to new caret position.
WordRight Move caret right one word.
WordRightEnd Move caret right one word, position cursor at end of word.
WordRightEndExtend Move caret right one word, position cursor at end of word, extending selection to new caret position.
WordRightExtend Move caret right one word extending selection to new caret position.
WordStartPosition Get position of start of word.
WrapCount The number of display lines needed to wrap a document line.
WriteText Writes the text into the text control at the current insertion position.
XYToPosition  
ZoomIn Magnify the displayed text by increasing the sizes by 1 point.
ZoomOut Make the displayed text smaller by decreasing the sizes by 1 point.

property_summary Properties Summary

AdditionalCaretForeground See GetAdditionalCaretForeground and SetAdditionalCaretForeground
AdditionalCaretsBlink See GetAdditionalCaretsBlink and SetAdditionalCaretsBlink
AdditionalCaretsVisible See GetAdditionalCaretsVisible and SetAdditionalCaretsVisible
AdditionalSelAlpha See GetAdditionalSelAlpha and SetAdditionalSelAlpha
AdditionalSelectionTyping See GetAdditionalSelectionTyping and SetAdditionalSelectionTyping
AllLinesVisible See GetAllLinesVisible
Anchor See GetAnchor and SetAnchor
BackSpaceUnIndents See GetBackSpaceUnIndents and SetBackSpaceUnIndents
BufferedDraw See GetBufferedDraw and SetBufferedDraw
CaretForeground See GetCaretForeground and SetCaretForeground
CaretLineBackAlpha See GetCaretLineBackAlpha and SetCaretLineBackAlpha
CaretLineBackground See GetCaretLineBackground and SetCaretLineBackground
CaretLineVisible See GetCaretLineVisible and SetCaretLineVisible
CaretPeriod See GetCaretPeriod and SetCaretPeriod
CaretSticky See GetCaretSticky and SetCaretSticky
CaretStyle See GetCaretStyle and SetCaretStyle
CaretWidth See GetCaretWidth and SetCaretWidth
CharacterPointer See GetCharacterPointer
CodePage See GetCodePage and SetCodePage
ControlCharSymbol See GetControlCharSymbol and SetControlCharSymbol
CurLine See GetCurLine
CurLineRaw See GetCurLineRaw
CurrentLine See GetCurrentLine
CurrentPos See GetCurrentPos and SetCurrentPos
DefaultStyle See GetDefaultStyle and SetDefaultStyle
DocPointer See GetDocPointer and SetDocPointer
EOLMode See GetEOLMode and SetEOLMode
EdgeColour See GetEdgeColour and SetEdgeColour
EdgeColumn See GetEdgeColumn and SetEdgeColumn
EdgeMode See GetEdgeMode and SetEdgeMode
EndAtLastLine See GetEndAtLastLine and SetEndAtLastLine
EndStyled See GetEndStyled
ExtraAscent See GetExtraAscent and SetExtraAscent
ExtraDescent See GetExtraDescent and SetExtraDescent
FirstVisibleLine See GetFirstVisibleLine and SetFirstVisibleLine
GapPosition See GetGapPosition
HighlightGuide See GetHighlightGuide and SetHighlightGuide
Hint See GetHint and SetHint
HotspotActiveBackground See GetHotspotActiveBackground
HotspotActiveForeground See GetHotspotActiveForeground
HotspotActiveUnderline See GetHotspotActiveUnderline and SetHotspotActiveUnderline
HotspotSingleLine See GetHotspotSingleLine and SetHotspotSingleLine
Identifier See GetIdentifier and SetIdentifier
Indent See GetIndent and SetIndent
IndentationGuides See GetIndentationGuides and SetIndentationGuides
IndicatorCurrent See GetIndicatorCurrent and SetIndicatorCurrent
IndicatorValue See GetIndicatorValue and SetIndicatorValue
InsertionPoint See GetInsertionPoint and SetInsertionPoint
KeysUnicode See GetKeysUnicode and SetKeysUnicode
LastKeydownProcessed See GetLastKeydownProcessed and SetLastKeydownProcessed
LastPosition See GetLastPosition
LayoutCache See GetLayoutCache and SetLayoutCache
Length See GetLength
Lexer See GetLexer and SetLexer
LineCount See GetLineCount
MainSelection See GetMainSelection and SetMainSelection
MarginLeft See GetMarginLeft and SetMarginLeft
MarginOptions See GetMarginOptions and SetMarginOptions
MarginRight See GetMarginRight and SetMarginRight
Margins See GetMargins
MaxLineState See GetMaxLineState
ModEventMask See GetModEventMask and SetModEventMask
Modify See GetModify
MouseDownCaptures See GetMouseDownCaptures and SetMouseDownCaptures
MouseDwellTime See GetMouseDwellTime and SetMouseDwellTime
MultiPaste See GetMultiPaste and SetMultiPaste
MultipleSelection See GetMultipleSelection and SetMultipleSelection
NumberOfLines See GetNumberOfLines
Overtype See GetOvertype and SetOvertype
PasteConvertEndings See GetPasteConvertEndings and SetPasteConvertEndings
PositionCacheSize See GetPositionCacheSize and SetPositionCacheSize
PrintColourMode See GetPrintColourMode and SetPrintColourMode
PrintMagnification See GetPrintMagnification and SetPrintMagnification
PrintWrapMode See GetPrintWrapMode and SetPrintWrapMode
PunctuationChars See GetPunctuationChars and SetPunctuationChars
RangePointer See GetRangePointer
ReadOnly See GetReadOnly and SetReadOnly
RectangularSelectionAnchor See GetRectangularSelectionAnchor and SetRectangularSelectionAnchor
RectangularSelectionAnchorVirtualSpace See GetRectangularSelectionAnchorVirtualSpace and SetRectangularSelectionAnchorVirtualSpace
RectangularSelectionCaret See GetRectangularSelectionCaret and SetRectangularSelectionCaret
RectangularSelectionCaretVirtualSpace See GetRectangularSelectionCaretVirtualSpace and SetRectangularSelectionCaretVirtualSpace
RectangularSelectionModifier See GetRectangularSelectionModifier and SetRectangularSelectionModifier
STCCursor See GetSTCCursor and SetSTCCursor
STCFocus See GetSTCFocus and SetSTCFocus
ScrollWidth See GetScrollWidth and SetScrollWidth
ScrollWidthTracking See GetScrollWidthTracking and SetScrollWidthTracking
SearchFlags See GetSearchFlags and SetSearchFlags
SelAlpha See GetSelAlpha and SetSelAlpha
SelEOLFilled See GetSelEOLFilled and SetSelEOLFilled
SelectedText See GetSelectedText
SelectedTextRaw See GetSelectedTextRaw
SelectionEnd See GetSelectionEnd and SetSelectionEnd
SelectionMode See GetSelectionMode and SetSelectionMode
SelectionStart See GetSelectionStart and SetSelectionStart
Selections See GetSelections
Status See GetStatus and SetStatus
StringSelection See GetStringSelection
StyleBits See GetStyleBits and SetStyleBits
StyleBitsNeeded See GetStyleBitsNeeded
TabIndents See GetTabIndents and SetTabIndents
TabWidth See GetTabWidth and SetTabWidth
TargetEnd See GetTargetEnd and SetTargetEnd
TargetStart See GetTargetStart and SetTargetStart
Technology See GetTechnology and SetTechnology
Text See GetText and SetText
TextLength See GetTextLength
TextRaw See GetTextRaw and SetTextRaw
TwoPhaseDraw See GetTwoPhaseDraw and SetTwoPhaseDraw
UndoCollection See GetUndoCollection and SetUndoCollection
UseHorizontalScrollBar See GetUseHorizontalScrollBar and SetUseHorizontalScrollBar
UseTabs See GetUseTabs and SetUseTabs
UseVerticalScrollBar See GetUseVerticalScrollBar and SetUseVerticalScrollBar
Value See GetValue and SetValue
ViewEOL See GetViewEOL and SetViewEOL
ViewWhiteSpace See GetViewWhiteSpace and SetViewWhiteSpace
VirtualSpaceOptions See GetVirtualSpaceOptions and SetVirtualSpaceOptions
WhitespaceChars See GetWhitespaceChars and SetWhitespaceChars
WhitespaceSize See GetWhitespaceSize and SetWhitespaceSize
WordChars See GetWordChars and SetWordChars
WrapIndentMode See GetWrapIndentMode and SetWrapIndentMode
WrapMode See GetWrapMode and SetWrapMode
WrapStartIndent See GetWrapStartIndent and SetWrapStartIndent
WrapVisualFlags See GetWrapVisualFlags and SetWrapVisualFlags
WrapVisualFlagsLocation See GetWrapVisualFlagsLocation and SetWrapVisualFlagsLocation
XOffset See GetXOffset and SetXOffset
Zoom See GetZoom and SetZoom

api Class API



class wx.stc.StyledTextCtrl(Control)

Possible constructors:

StyledTextCtrl(parent, id=ID_ANY, pos=DefaultPosition, size=DefaultSize,
               style=0, name=STCNameStr)

StyledTextCtrl()

A wxWidgets implementation of the Scintilla source code editing component.


Methods



__init__(self, *args, **kw)

overload Overloaded Implementations:



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

Ctor.

Parameters:



__init__ (self)

Default constructor.





AddRefDocument(self, docPointer)

Extend life of document.

Parameters:docPointer


AddSelection(self, caret, anchor)

Add a selection.

Parameters:
  • caret (int) –
  • anchor (int) –
Return type:

int



AddStyledText(self, data)

Add array of cells to document.

Parameters:data (MemoryBuffer) –


AddText(self, text)

Add text to the document at current position.

Parameters:text (string) –


AddTextRaw(self, text, length=-1)

Add text to the document at current position.

Parameters:
  • text (int) –
  • length (int) –


AddUndoAction(self, token, flags)

Add a container action to the undo stack.

Parameters:
  • token (int) –
  • flags (int) –


Allocate(self, bytes)

Enlarge the document to a particular size of text bytes.

Parameters:bytes (int) –


AnnotationClearAll(self)

Clear the annotations from all lines.



AnnotationClearLine(self, line)

Clear annotations from the given line.

Parameters:line (int) –


AnnotationGetLines(self, line)

Get the number of annotation lines for a line.

Parameters:line (int) –
Return type:int


AnnotationGetStyle(self, line)

Get the style number for the annotations for a line.

Parameters:line (int) –
Return type:int


AnnotationGetStyleOffset(self)

Get the start of the range of style numbers used for annotations.

Return type:int


AnnotationGetStyles(self, line)

Get the annotation styles for a line.

Parameters:line (int) –
Return type:string


AnnotationGetText(self, line)

Get the annotation text for a line.

Parameters:line (int) –
Return type:string


AnnotationGetVisible(self)

Get the visibility for the annotations for a view.

Return type:int


AnnotationSetStyle(self, line, style)

Set the style number for the annotations for a line.

Parameters:
  • line (int) –
  • style (int) –


AnnotationSetStyleOffset(self, style)

Get the start of the range of style numbers used for annotations.

Parameters:style (int) –


AnnotationSetStyles(self, line, styles)

Set the annotation styles for a line.

Parameters:
  • line (int) –
  • styles (string) –


AnnotationSetText(self, line, text)

Set the annotation text for a line.

Parameters:
  • line (int) –
  • text (string) –


AnnotationSetVisible(self, visible)

Set the visibility for the annotations for a view.

Parameters:visible (int) –


AppendText(self, text)

Append a string to the end of the document without changing the selection.

Parameters:text (string) –


AppendTextRaw(self, text, length=-1)

Append a string to the end of the document without changing the selection.

Parameters:
  • text (int) –
  • length (int) –


AutoCompActive(self)

Is there an auto-completion list visible?

Return type:bool


AutoCompCancel(self)

Remove the auto-completion list from the screen.



AutoCompComplete(self)

User has selected an item so remove the list and insert the selection.



AutoCompGetAutoHide(self)

Retrieve whether or not autocompletion is hidden automatically when nothing matches.

Return type:bool


AutoCompGetCancelAtStart(self)

Retrieve whether auto-completion cancelled by backspacing before start.

Return type:bool


AutoCompGetCaseInsensitiveBehaviour(self)

Get auto-completion case insensitive behaviour.

Return type:int


AutoCompGetChooseSingle(self)

Retrieve whether a single item auto-completion list automatically choose the item.

Return type:bool


AutoCompGetCurrent(self)

Get currently selected item position in the auto-completion list.

Return type:int


AutoCompGetDropRestOfWord(self)

Retrieve whether or not autocompletion deletes any word characters after the inserted text upon completion.

Return type:bool


AutoCompGetIgnoreCase(self)

Retrieve state of ignore case flag.

Return type:bool


AutoCompGetMaxHeight(self)

Set the maximum height, in rows, of auto-completion and user lists.

Return type:int


AutoCompGetMaxWidth(self)

Get the maximum width, in characters, of auto-completion and user lists.

Return type:int


AutoCompGetSeparator(self)

Retrieve the auto-completion list separator character.

Return type:int


AutoCompGetTypeSeparator(self)

Retrieve the auto-completion list type-separator character.

Return type:int


AutoCompPosStart(self)

Retrieve the position of the caret when the auto-completion list was displayed.

Return type:int


AutoCompSelect(self, text)

Select the item in the auto-completion list that starts with a string.

Parameters:text (string) –


AutoCompSetAutoHide(self, autoHide)

Set whether or not autocompletion is hidden automatically when nothing matches.

Parameters:autoHide (bool) –


AutoCompSetCancelAtStart(self, cancel)

Should the auto-completion list be cancelled if the user backspaces to a position before where the box was created.

Parameters:cancel (bool) –


AutoCompSetCaseInsensitiveBehaviour(self, behaviour)

Set auto-completion case insensitive behaviour to either prefer case-sensitive matches or have no preference.

Parameters:behaviour (int) –


AutoCompSetChooseSingle(self, chooseSingle)

Should a single item auto-completion list automatically choose the item.

Parameters:chooseSingle (bool) –


AutoCompSetDropRestOfWord(self, dropRestOfWord)

Set whether or not autocompletion deletes any word characters after the inserted text upon completion.

Parameters:dropRestOfWord (bool) –


AutoCompSetFillUps(self, characterSet)

Define a set of characters that when typed will cause the autocompletion to choose the selected item.

Parameters:characterSet (string) –


AutoCompSetIgnoreCase(self, ignoreCase)

Set whether case is significant when performing auto-completion searches.

Parameters:ignoreCase (bool) –


AutoCompSetMaxHeight(self, rowCount)

Set the maximum height, in rows, of auto-completion and user lists.

The default is 5 rows.

Parameters:rowCount (int) –


AutoCompSetMaxWidth(self, characterCount)

Set the maximum width, in characters, of auto-completion and user lists.

Set to 0 to autosize to fit longest item, which is the default.

Parameters:characterCount (int) –


AutoCompSetSeparator(self, separatorCharacter)

Change the separator character in the string setting up an auto-completion list.

Default is space but can be changed if items contain space.

Parameters:separatorCharacter (int) –


AutoCompSetTypeSeparator(self, separatorCharacter)

Change the type-separator character in the string setting up an auto-completion list.

Default is ‘?’ but can be changed if items contain ‘?’.

Parameters:separatorCharacter (int) –


AutoCompShow(self, lenEntered, itemList)

Display a auto-completion list.

The lenEntered parameter indicates how many characters before the caret should be used to provide context.

Parameters:
  • lenEntered (int) –
  • itemList (string) –


AutoCompStops(self, characterSet)

Define a set of character that when typed cancel the auto-completion list.

Parameters:characterSet (string) –


AutoComplete(self, *args, **kw)

overload Overloaded Implementations:



AutoComplete (self, choices)

Call this function to enable auto-completion of the text typed in a single-line text control using the given choices.

Notice that currently this function is only implemented in wxGTK2, wxMSW and OSX/Cocoa (for wx.TextCtrl only, but not for wx.ComboBox) ports and does nothing under the other platforms.

Parameters:choices (list of strings) –
Return type: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.

New in version 2.9.0.



AutoComplete (self, completer)

Enable auto-completion using the provided completer object.

This method should be used instead of AutoComplete overload taking the array of possible completions if the total number of strings is too big as it allows to return 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 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 wx.TextCompleter.

Currently this method is only implemented in wxMSW and OSX/Cocoa (for wx.TextCtrl only, but not for wx.ComboBox).

Parameters:completer (wx.TextCompleter) – The object to be used for generating completions if not None. If it is None, auto-completion is disabled. The wx.TextEntry object takes ownership of this pointer and will delete it in any case (i.e. even if this method returns False).
Return type: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.

New in version 2.9.2.





AutoCompleteDirectories(self)

Call this function to enable auto-completion of the text using the file system directories.

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

Return type: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.

New in version 2.9.3.

See also

AutoComplete



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.

Return type: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.

New in version 2.9.0.

See also

AutoComplete



BackTab(self)

Dedent the selected lines.



BeginUndoAction(self)

Start a sequence of actions that is undone and redone as a unit.

May be nested.



BraceBadLight(self, pos)

Highlight the character at a position indicating there is no matching brace.

Parameters:pos (int) –


BraceBadLightIndicator(self, useBraceBadLightIndicator, indicator)

Use specified indicator to highlight non matching brace instead of changing its style.

Parameters:
  • useBraceBadLightIndicator (bool) –
  • indicator (int) –


BraceHighlight(self, pos1, pos2)

Highlight the characters at two positions.

Parameters:
  • pos1 (int) –
  • pos2 (int) –


BraceHighlightIndicator(self, useBraceHighlightIndicator, indicator)

Use specified indicator to highlight matching braces instead of changing their style.

Parameters:
  • useBraceHighlightIndicator (bool) –
  • indicator (int) –


BraceMatch(self, pos)

Find the position of a matching brace or INVALID_POSITION if no match.

Parameters:pos (int) –
Return type:int


CallTipActive(self)

Is there an active call tip?

Return type:bool


CallTipCancel(self)

Remove the call tip from the screen.



CallTipPosAtStart(self)

Retrieve the position where the caret was before displaying the call tip.

Return type:int


CallTipSetBackground(self, back)

Set the background colour for the call tip.

Parameters:back (wx.Colour) –


CallTipSetForeground(self, fore)

Set the foreground colour for the call tip.

Parameters:fore (wx.Colour) –


CallTipSetForegroundHighlight(self, fore)

Set the foreground colour for the highlighted part of the call tip.

Parameters:fore (wx.Colour) –


CallTipSetHighlight(self, start, end)

Highlight a segment of the definition.

Parameters:
  • start (int) –
  • end (int) –


CallTipSetPosition(self, above)

Set position of calltip, above or below text.

Parameters:above (bool) –


CallTipShow(self, pos, definition)

Show a call tip containing a definition near position pos.

Parameters:
  • pos (int) –
  • definition (string) –


CallTipUseStyle(self, tabSize)

Enable use of STYLE_CALLTIP and set call tip tab size in pixels.

Parameters:tabSize (int) –


CanCopy(self)

Returns True if the selection can be copied to the clipboard.

Return type:bool


CanCut(self)

Returns True if the selection can be cut to the clipboard.

Return type:bool


CanPaste(self)

Will a paste succeed?

Return type:bool


CanRedo(self)

Are there any redoable actions in the undo history?

Return type:bool


CanUndo(self)

Are there any undoable actions in the undo history?

Return type:bool


Cancel(self)

Cancel any modes such as call tip or auto-completion list display.



ChangeLexerState(self, start, end)

Indicate that the internal state of a lexer has changed over a range and therefore there may be a need to redraw.

Parameters:
  • start (int) –
  • end (int) –
Return type:

int



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

See User Generated Events vs Programmatically Generated Events for more information.

Parameters:value (string) – The new value to set. It may contain newline characters if the text control is multi-line.

New in version 2.7.1.



CharLeft(self)

Move caret left one character.



CharLeftExtend(self)

Move caret left one character extending selection to new caret position.



CharLeftRectExtend(self)

Move caret left one character, extending rectangular selection to new caret position.



CharPositionFromPoint(self, x, y)

Find the position of a character from a point within the window.

Parameters:
  • x (int) –
  • y (int) –
Return type:

int



CharPositionFromPointClose(self, x, y)

Find the position of a character from a point within the window.

Return INVALID_POSITION if not close to text.

Parameters:
  • x (int) –
  • y (int) –
Return type:

int



CharRight(self)

Move caret right one character.



CharRightExtend(self)

Move caret right one character extending selection to new caret position.



CharRightRectExtend(self)

Move caret right one character, extending rectangular selection to new caret position.



ChooseCaretX(self)

Set the last x chosen value to be the caret x position.



Clear(self)

Clear the selection.



ClearAll(self)

Delete all text in the document.



ClearDocumentStyle(self)

Set all style bytes to 0, remove all folding information.



ClearRegisteredImages(self)

Clear all the registered images.



ClearSelections(self)

Clear selections to a single empty stream selection.



CmdKeyAssign(self, key, modifiers, cmd)

When key+modifier combination km is pressed perform msg.

Parameters:
  • key (int) –
  • modifiers (int) –
  • cmd (int) –


CmdKeyClear(self, key, modifiers)

When key+modifier combination km is pressed do nothing.

Parameters:
  • key (int) –
  • modifiers (int) –


CmdKeyClearAll(self)

Drop all key mappings.



CmdKeyExecute(self, cmd)

Perform one of the operations defined by the STC_CMD_ constants.

Parameters:cmd (int) –


Colourise(self, start, end)

Colourise a segment of the document using the current lexing language.

Parameters:
  • start (int) –
  • end (int) –


ContractedFoldNext(self, lineStart)

Find the next line at or after lineStart that is a contracted fold header line.

Return -1 when no more lines.

Parameters:lineStart (int) –
Return type:int


ConvertEOLs(self, eolMode)

Convert all line endings in the document to one mode.

Parameters:eolMode (int) –


Copy(self)

Copy the selection to the clipboard.



CopyAllowLine(self)

Copy the selection, if selection empty copy the line with the caret.



CopyRange(self, start, end)

Copy a range of text to the clipboard.

Positions are clipped into the document.

Parameters:
  • start (int) –
  • end (int) –


CopyText(self, length, text)

Copy argument text to the clipboard.

Parameters:
  • length (int) –
  • text (string) –


CountCharacters(self, startPos, endPos)

Count characters between two positions.

Parameters:
  • startPos (int) –
  • endPos (int) –
Return type:

int



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

Create the UI elements for a STC that was created with the default constructor.

(For 2-phase create.)

Parameters:
Return type:

bool



CreateDocument(self)

Create a new document object.

Starts with reference count of 1 and not selected into editor.



CreateLoader(self, bytes)

Create an ILoader.

Parameters:bytes (int) –


Cut(self)

Cut the selection to the clipboard.



DelLineLeft(self)

Delete back from the current position to the start of the line.



DelLineRight(self)

Delete forwards from the current position to the end of the line.



DelWordLeft(self)

Delete the word to the left of the caret.



DelWordRight(self)

Delete the word to the right of the caret.



DelWordRightEnd(self)

Delete the word to the right of the caret, but not the trailing non-word characters.



DeleteBack(self)

Delete the selection or if no selection, the character before the caret.



DeleteBackNotLine(self)

Delete the selection or if no selection, the character before the caret.

Will not delete the character before at the start of a line.



DeleteRange(self, pos, deleteLength)

Delete a range of text in the document.

Parameters:
  • pos (int) –
  • deleteLength (int) –


DescribeKeyWordSets(self)

Retrieve a ‘

‘ separated list of descriptions of the keyword sets understood by the current lexer.

Return type:string


DescribeProperty(self, name)

Describe a property.

Parameters:name (string) –
Return type:string


DiscardEdits(self)


DoDragOver(self, x, y, defaultRes)

Allow for simulating a DnD DragOver.

Parameters:
  • x (int) –
  • y (int) –
  • defaultRes (DragResult) –
Return type:

wx.DragResult



DoDropText(self, x, y, data)

Allow for simulating a DnD DropText.

Parameters:
  • x (long) –
  • y (long) –
  • data (string) –
Return type:

bool



DocLineFromVisible(self, lineDisplay)

Find the document line of a display line taking hidden lines into account.

Parameters:lineDisplay (int) –
Return type:int


DocumentEnd(self)

Move caret to last position in document.



DocumentEndExtend(self)

Move caret to last position in document extending selection to new caret position.



DocumentStart(self)

Move caret to first position in document.



DocumentStartExtend(self)

Move caret to first position in document extending selection to new caret position.



EditToggleOvertype(self)

Switch from insert to overtype mode or the reverse.



EmptyUndoBuffer(self)

Delete the undo history.



EndUndoAction(self)

End a sequence of actions that is undone and redone as a unit.



EnsureCaretVisible(self)

Ensure the caret is visible.



EnsureVisible(self, line)

Ensure a particular line is visible by expanding any header line hiding it.

Parameters:line (int) –


EnsureVisibleEnforcePolicy(self, line)

Ensure a particular line is visible by expanding any header line hiding it.

Use the currently set visibility policy to determine which range to display.

Parameters:line (int) –


FindColumn(self, line, column)

Find the position of a column on a line taking into account tabs and multi-byte characters.

If beyond end of line, return line end position.

Parameters:
  • line (int) –
  • column (int) –
Return type:

int



FindText(self, minPos, maxPos, text, flags=0)

Find some text in the document.

Parameters:
  • minPos (int) –
  • maxPos (int) –
  • text (string) –
  • flags (int) –
Return type:

int



FormFeed(self)

Insert a Form Feed character.



FormatRange(self, doDraw, startPos, endPos, draw, target, renderRect, pageRect)

On Windows, will draw the document into a display context such as a printer.

Parameters:
  • doDraw (bool) –
  • startPos (int) –
  • endPos (int) –
  • draw (wx.DC) –
  • target (wx.DC) –
  • renderRect (wx.Rect) –
  • pageRect (wx.Rect) –
Return type:

int



GetAdditionalCaretForeground(self)

Get the foreground colour of additional carets.

Return type: wx.Colour


Whether additional carets will blink.

Return type:bool


GetAdditionalCaretsVisible(self)

Whether additional carets are visible.

Return type:bool


GetAdditionalSelAlpha(self)

Get the alpha of the selection.

Return type:int


GetAdditionalSelectionTyping(self)

Whether typing can be performed into multiple selections.

Return type:bool


GetAllLinesVisible(self)

Are all lines visible?

Return type:bool


GetAnchor(self)

Returns the position of the opposite end of the selection to the caret.

Return type:int


GetBackSpaceUnIndents(self)

Does a backspace pressed when caret is within indentation unindent?

Return type:bool


GetBufferedDraw(self)

Is drawing done first into a buffer or direct to the screen?

Return type:bool


GetCaretForeground(self)

Get the foreground colour of the caret.

Return type: wx.Colour


GetCaretLineBackAlpha(self)

Get the background alpha of the caret line.

Return type:int


GetCaretLineBackground(self)

Get the colour of the background of the line containing the caret.

Return type: wx.Colour


GetCaretLineVisible(self)

Is the background of the line containing the caret in a different colour?

Return type:bool


GetCaretPeriod(self)

Get the time in milliseconds that the caret is on and off.

Return type:int


GetCaretSticky(self)

Can the caret preferred x position only be changed by explicit movement commands?

Return type:int


GetCaretStyle(self)

Returns the current style of the caret.

Return type:int


GetCaretWidth(self)

Returns the width of the insert mode caret.

Return type:int


GetCharAt(self, pos)

Returns the character byte at the position.

Parameters:pos (int) –
Return type:int


GetCharacterPointer(self)
Compact the document buffer and return a read-only memoryview object of the characters in the document.
Return type:PyObject


GetCodePage(self)

Get the code page used to interpret the bytes of the document as characters.

Return type:int


GetColumn(self, pos)

Retrieve the column number of a position, taking tab width into account.

Parameters:pos (int) –
Return type:int


GetControlCharSymbol(self)

Get the way control characters are displayed.

Return type:int


GetCurLine(self)

Retrieve the text of the line containing the caret.

Returns the index of the caret on the line.

Return type:tuple
Returns:( String , linePos )


GetCurLineRaw(self)

Retrieve the text of the line containing the caret.

Returns the index of the caret on the line.

Return type:tuple
Returns:( CharBuffer , linePos )


GetCurrentLine(self)

Returns the line number of the line with the caret.

Return type:int


GetCurrentPos(self)

Returns the position of the caret.

Return type:int


GetDefaultStyle(self)

Returns the style currently used for the new text.

Return type: wx.TextAttr

See also

SetDefaultStyle



GetDocPointer(self)

Retrieve a pointer to the document object.



GetEOLMode(self)

Retrieve the current end of line mode - one of CRLF, CR, or LF.

Return type:int


GetEdgeColour(self)

Retrieve the colour used in edge indication.

Return type: wx.Colour


GetEdgeColumn(self)

Retrieve the column number which text should be kept within.

Return type:int


GetEdgeMode(self)

Retrieve the edge highlight mode.

Return type:int


GetEndAtLastLine(self)

Retrieve whether the maximum scroll position has the last line at the bottom of the view.

Return type:bool


GetEndStyled(self)

Retrieve the position of the last correctly styled character.

Return type:int


GetExtraAscent(self)

Get extra ascent for each line.

Return type:int


GetExtraDescent(self)

Get extra descent for each line.

Return type:int


GetFirstVisibleLine(self)

Retrieve the display line at the top of the display.

Return type:int


GetFoldExpanded(self, line)

Is a header line expanded?

Parameters:line (int) –
Return type:bool


GetFoldLevel(self, line)

Retrieve the fold level of a line.

Parameters:line (int) –
Return type:int


GetFoldParent(self, line)

Find the parent line of a child line.

Parameters:line (int) –
Return type:int


GetGapPosition(self)

Return a position which, to avoid performance costs, should not be within the range of a call to GetRangePointer.

Return type:int


GetHighlightGuide(self)

Get the highlighted indentation guide column.

Return type:int


GetHint(self)

Returns the current hint string.

See SetHint for more information about hints.

Return type:string

New in version 2.9.0.



GetHotspotActiveBackground(self)

Get the back colour for active hotspots.

Return type: wx.Colour


GetHotspotActiveForeground(self)

Get the fore colour for active hotspots.

Return type: wx.Colour


GetHotspotActiveUnderline(self)

Get whether underlining for active hotspots.

Return type:bool


GetHotspotSingleLine(self)

Get the HotspotSingleLine property.

Return type:bool


GetIdentifier(self)

Get the identifier.

Return type:int


GetIndent(self)

Retrieve indentation size.

Return type:int


GetIndentationGuides(self)

Are the indentation guides visible?

Return type:int


GetIndicatorCurrent(self)

Get the current indicator.

Return type:int


GetIndicatorValue(self)

Get the current indicator value.

Return type:int


GetInsertionPoint(self)

Returns the insertion point, or cursor, position.

This is defined as the zero based index of the character position to the right of the insertion point. For example, if the insertion point is at the end of the single-line text control, it is equal to GetLastPosition .

Notice that insertion position is, in general, different from the index of the character the cursor position at in the string returned by GetValue . While this is always the case for the single line controls, multi-line controls can use two characters "\\r\\n" as line separator (this is notably the case under MSW) meaning that indices in the control and its string value are offset by 1 for every line.

Hence to correctly get the character at the current cursor position, taking into account that there can be none if the cursor is at the end of the string, you could do the following:

def GetCurrentChar(self, text_ctrl):

    pos = text_ctrl.GetInsertionPoint()
    if pos == text_ctrl.GetLastPosition():
        return ''

    return text_ctrl.GetRange(pos, pos + 1)
Return type:long


GetKeysUnicode(self)

Are keys always interpreted as Unicode?

Return type:bool


GetLastChild(self, line, level)

Find the last child line of a header line.

Parameters:
  • line (int) –
  • level (int) –
Return type:

int



GetLastKeydownProcessed(self)

Can be used to prevent the EVT_CHAR handler from adding the char.

Return type:bool


GetLastPosition(self)

Returns the zero based index of the last position in the text control, which is equal to the number of characters in the control.

Return type:long


GetLayoutCache(self)

Retrieve the degree of caching of layout information.

Return type:int


GetLength(self)

Returns the number of bytes in the document.

Return type:int


GetLexer(self)

Retrieve the lexing language of the document.

Return type:int


static GetLibraryVersionInfo()
Return type: wx.VersionInfo


GetLine(self, line)

Retrieve the contents of a line.

Parameters:line (int) –
Return type:string


GetLineCount(self)

Returns the number of lines in the document.

There is always at least one.

Return type:int


GetLineEndPosition(self, line)

Get the position after the last visible characters on a line.

Parameters:line (int) –
Return type:int


GetLineIndentPosition(self, line)

Retrieve the position before the first non indentation character on a line.

Parameters:line (int) –
Return type:int


GetLineIndentation(self, line)

Retrieve the number of columns that a line is indented.

Parameters:line (int) –
Return type:int


GetLineLength(self, n)
Parameters:n (long) –
Return type:int


GetLineRaw(self, line)

Retrieve the contents of a line.

Parameters:line (int) –
Return type:CharBuffer


GetLineSelEndPosition(self, line)

Retrieve the position of the end of the selection at the given line (INVALID_POSITION if no selection on this line).

Parameters:line (int) –
Return type:int


GetLineSelStartPosition(self, line)

Retrieve the position of the start of the selection at the given line (INVALID_POSITION if no selection on this line).

Parameters:line (int) –
Return type:int


GetLineState(self, line)

Retrieve the extra styling information for a line.

Parameters:line (int) –
Return type:int


GetLineText(self, n)
Parameters:n (long) –
Return type:string


GetLineVisible(self, line)

Is a line visible?

Parameters:line (int) –
Return type:bool


GetMainSelection(self)

Which selection is the main selection.

Return type:int


GetMarginCursor(self, margin)

Retrieve the cursor shown in a margin.

Parameters:margin (int) –
Return type:int


GetMarginLeft(self)

Returns the size in pixels of the left margin.

Return type:int


GetMarginMask(self, margin)

Retrieve the marker mask of a margin.

Parameters:margin (int) –
Return type:int


GetMarginOptions(self)

Get the margin options.

Return type:int


GetMarginRight(self)

Returns the size in pixels of the right margin.

Return type:int


GetMarginSensitive(self, margin)

Retrieve the mouse click sensitivity of a margin.

Parameters:margin (int) –
Return type:bool


GetMarginType(self, margin)

Retrieve the type of a margin.

Parameters:margin (int) –
Return type:int


GetMarginWidth(self, margin)

Retrieve the width of a margin in pixels.

Parameters:margin (int) –
Return type:int


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.

Return type: wx.Point

New in version 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 SetMargins .

See also

SetMargins



GetMarkerSymbolDefined(self, markerNumber)

Which symbol was defined for markerNumber with MarkerDefine.

Parameters:markerNumber (int) –
Return type:int


GetMaxLineState(self)

Retrieve the last line number that has line state.

Return type:int


GetModEventMask(self)

Get which document modification events are sent to the container.

Return type:int


GetModify(self)

Is the document different from when it was last saved?

Return type:bool


GetMouseDownCaptures(self)

Get whether mouse gets captured.

Return type:bool


GetMouseDwellTime(self)

Retrieve the time the mouse must sit still to generate a mouse dwell event.

Return type:int


GetMultiPaste(self)

Retrieve the effect of pasting when there are multiple selections.

Return type:int


GetMultipleSelection(self)

Whether multiple selections can be made.

Return type:bool


GetNumberOfLines(self)
Return type:int


GetOvertype(self)

Returns True if overtype mode is active otherwise False is returned.

Return type:bool


GetPasteConvertEndings(self)

Get convert-on-paste setting.

Return type:bool


GetPositionCacheSize(self)

How many entries are allocated to the position cache?

Return type:int


GetPrintColourMode(self)

Returns the print colour mode.

Return type:int


GetPrintMagnification(self)

Returns the print magnification.

Return type:int


GetPrintWrapMode(self)

Is printing line wrapped?

Return type:int


GetProperty(self, key)

Retrieve a ‘property’ value previously set with SetProperty.

Parameters:key (string) –
Return type:string


GetPropertyExpanded(self, key)

Retrieve a ‘property’ value previously set with SetProperty, with ‘$()’ variable replacement on returned buffer.

Parameters:key (string) –
Return type:string


GetPropertyInt(self, key)

Retrieve a ‘property’ value previously set with SetProperty, interpreted as an int AFTER any ‘$()’ variable replacement.

Parameters:key (string) –
Return type:int


GetPunctuationChars(self)

Get the set of characters making up punctuation characters.

Return type:string


GetRange(self, from_, to_)

Returns the string containing the text starting in the positions from and up to to in the control.

The positions must have been returned by another wx.TextCtrl method. Please note that the positions in a multiline wx.TextCtrl do not correspond to the indices in the string returned by GetValue because of the different new line representations ( CR or CR LF) and so this method should be used to obtain the correct results instead of extracting parts of the entire value. It may also be more efficient, especially if the control contains a lot of data.

Parameters:
  • from_ (long) –
  • to_ (long) –
Return type:

string



GetRangePointer(self, position, rangeLength)
Return a read-only pointer to a range of characters in the document. May move the gap so that the range is contiguous, but will only move up to rangeLength bytes.
Return type:PyObject


GetReadOnly(self)

In read-only mode?

Return type:bool


GetRectangularSelectionAnchor(self)
Return type:int


GetRectangularSelectionAnchorVirtualSpace(self)
Return type:int


GetRectangularSelectionCaret(self)
Return type:int


GetRectangularSelectionCaretVirtualSpace(self)
Return type:int


GetRectangularSelectionModifier(self)

Get the modifier key used for rectangular selection.

Return type:int


GetSTCCursor(self)

Get cursor type.

Return type:int


GetSTCFocus(self)

Get internal focus flag.

Return type:bool


GetScrollWidth(self)

Retrieve the document width assumed for scrolling.

Return type:int


GetScrollWidthTracking(self)

Retrieve whether the scroll width tracks wide lines.

Return type:bool


GetSearchFlags(self)

Get the search flags used by SearchInTarget.

Return type:int


GetSelAlpha(self)

Get the alpha of the selection.

Return type:int


GetSelEOLFilled(self)

Is the selection end of line filled?

Return type:bool


GetSelectedText(self)

Retrieve the selected text.

Return type:string


GetSelectedTextRaw(self)

Retrieve the selected text.

Return type:CharBuffer


GetSelection(self)

Gets the current selection span.

If the returned values are equal, there was no selection. Please note that the indices returned may be used with the other wx.TextCtrl methods but don’t necessarily represent the correct indices into the string returned by GetValue for multiline controls under Windows (at least,) you should use GetStringSelection to get the selected text.

The returned first position.

The returned last position.

Return type:tuple


GetSelectionEnd(self)

Returns the position at the end of the selection.

Return type:int


GetSelectionMode(self)

Get the mode of the current selection.

Return type:int


GetSelectionNAnchor(self, selection)
Parameters:selection (int) –
Return type:int


GetSelectionNAnchorVirtualSpace(self, selection)
Parameters:selection (int) –
Return type:int


GetSelectionNCaret(self, selection)
Parameters:selection (int) –
Return type:int


GetSelectionNCaretVirtualSpace(self, selection)
Parameters:selection (int) –
Return type:int


GetSelectionNEnd(self, selection)

Returns the position at the end of the selection.

Parameters:selection (int) –
Return type:int


GetSelectionNStart(self, selection)

Returns the position at the start of the selection.

Parameters:selection (int) –
Return type:int


GetSelectionStart(self)

Returns the position at the start of the selection.

Return type:int


GetSelections(self)

How many selections are there?

Return type:int


GetStatus(self)

Get error status.

Return type:int


GetStringSelection(self)

Gets the text currently selected in the control.

If there is no selection, the returned string is empty.

Return type:string


GetStyle(self, position, style)
Parameters:
Return type:

bool



GetStyleAt(self, pos)

Returns the style byte at the position.

Parameters:pos (int) –
Return type:int


GetStyleBits(self)

Retrieve number of bits in style bytes used to hold the lexical state.

Return type:int


GetStyleBitsNeeded(self)

Retrieve the number of bits the current lexer needs for styling.

Return type:int


GetStyledText(self, startPos, endPos)

Retrieve a buffer of cells.

Parameters:
  • startPos (int) –
  • endPos (int) –
Return type:

MemoryBuffer



GetTabIndents(self)

Does a tab pressed when caret is within indentation indent?

Return type:bool


GetTabWidth(self)

Retrieve the visible size of a tab.

Return type:int


GetTag(self, tagNumber)

Retrieve the value of a tag from a regular expression search.

Parameters:tagNumber (int) –
Return type:string


GetTargetEnd(self)

Get the position that ends the target.

Return type:int


GetTargetStart(self)

Get the position that starts the target.

Return type:int


GetTechnology(self)

Get the tech.

Return type:int


GetText(self)

Retrieve all the text in the document.

Return type:string


GetTextLength(self)

Retrieve the number of characters in the document.

Return type:int


GetTextRange(self, startPos, endPos)

Retrieve a range of text.

Parameters:
  • startPos (int) –
  • endPos (int) –
Return type:

string



GetTextRangeRaw(self, startPos, endPos)

Retrieve a range of text.

Parameters:
  • startPos (int) –
  • endPos (int) –
Return type:

CharBuffer



GetTextRaw(self)

Retrieve all the text in the document.

Return type:CharBuffer


GetTwoPhaseDraw(self)

Is drawing done in two phases with backgrounds drawn before foregrounds?

Return type:bool


GetUndoCollection(self)

Is undo history being collected?

Return type:bool


GetUseHorizontalScrollBar(self)

Is the horizontal scroll bar visible?

Return type:bool


GetUseTabs(self)

Retrieve whether tabs will be used in indentation.

Return type:bool


GetUseVerticalScrollBar(self)

Is the vertical scroll bar visible?

Return type:bool


GetValue(self)

Gets the contents of the control.

Notice that for a multiline text control, the lines will be separated by (Unix-style) \n characters, even under Windows where they are separated by a \r\n sequence in the native control.

Return type:string


GetViewEOL(self)

Are the end of line characters visible?

Return type:bool


GetViewWhiteSpace(self)

Are white space characters currently visible? Returns one of SCWS_ constants.

Return type:int


GetVirtualSpaceOptions(self)
Return type:int


GetWhitespaceChars(self)

Get the set of characters making up whitespace for when moving or selecting by word.

Return type:string


GetWhitespaceSize(self)

Get the size of the dots used to mark space characters.

Return type:int


GetWordChars(self)

Get the set of characters making up words for when moving or selecting by word.

Return type:string


GetWrapIndentMode(self)

Retrieve how wrapped sublines are placed.

Default is fixed.

Return type:int


GetWrapMode(self)

Retrieve whether text is word wrapped.

Return type:int


GetWrapStartIndent(self)

Retrive the start indent for wrapped lines.

Return type:int


GetWrapVisualFlags(self)

Retrive the display mode of visual flags for wrapped lines.

Return type:int


GetWrapVisualFlagsLocation(self)

Retrive the location of visual flags for wrapped lines.

Return type:int


GetXOffset(self)
Return type:int


GetZoom(self)

Retrieve the zoom level.

Return type:int


GotoLine(self, line)

Set caret to start of a line and ensure it is visible.

Parameters:line (int) –


GotoPos(self, pos)

Set caret to a position and ensure it is visible.

Parameters:pos (int) –


HideLines(self, lineStart, lineEnd)

Make a range of lines invisible.

Parameters:
  • lineStart (int) –
  • lineEnd (int) –


HideSelection(self, normal)

Draw the selection in normal style or with selection highlighted.

Parameters:normal (bool) –


HitTestPos(self, pt)
Parameters:pt (wx.Point) –
Return type:tuple
Returns:( wx.TextCtrlHitTestResult, pos )


HitTest(self, pt)
Parameters:pt (wx.Point) –
Return type:tuple
Returns:( wx.TextCtrlHitTestResult, col, row )


Home(self)

Move caret to first position on line.



HomeDisplay(self)

Move caret to first position on display line.



HomeDisplayExtend(self)

Move caret to first position on display line extending selection to new caret position.



HomeExtend(self)

Move caret to first position on line extending selection to new caret position.



HomeRectExtend(self)

Move caret to first position on line, extending rectangular selection to new caret position.



HomeWrap(self)

These are like their namesakes Home(Extend)?, LineEnd(Extend)?, VCHome(Extend)? except they behave differently when word-wrap is enabled: They go first to the start / end of the display line, like (Home|LineEnd)Display The difference is that, the cursor is already at the point, it goes on to the start or end of the document line, as appropriate for (Home|LineEnd|VCHome)(Extend)?.



HomeWrapExtend(self)


IndicatorAllOnFor(self, position)

Are any indicators present at position?

Parameters:position (int) –
Return type:int


IndicatorClearRange(self, position, clearLength)

Turn a indicator off over a range.

Parameters:
  • position (int) –
  • clearLength (int) –


IndicatorEnd(self, indicator, position)

Where does a particular indicator end?

Parameters:
  • indicator (int) –
  • position (int) –
Return type:

int



IndicatorFillRange(self, position, fillLength)

Turn a indicator on over a range.

Parameters:
  • position (int) –
  • fillLength (int) –


IndicatorGetAlpha(self, indicator)

Get the alpha fill colour of the given indicator.

Parameters:indicator (int) –
Return type:int


IndicatorGetForeground(self, indic)

Retrieve the foreground colour of an indicator.

Parameters:indic (int) –
Return type: wx.Colour


IndicatorGetOutlineAlpha(self, indicator)

Get the alpha outline colour of the given indicator.

Parameters:indicator (int) –
Return type:int


IndicatorGetStyle(self, indic)

Retrieve the style of an indicator.

Parameters:indic (int) –
Return type:int


IndicatorGetUnder(self, indic)

Retrieve whether indicator drawn under or over text.

Parameters:indic (int) –
Return type:bool


IndicatorSetAlpha(self, indicator, alpha)

Set the alpha fill colour of the given indicator.

Parameters:
  • indicator (int) –
  • alpha (int) –


IndicatorSetForeground(self, indic, fore)

Set the foreground colour of an indicator.

Parameters:


IndicatorSetOutlineAlpha(self, indicator, alpha)

Set the alpha outline colour of the given indicator.

Parameters:
  • indicator (int) –
  • alpha (int) –


IndicatorSetStyle(self, indic, style)

Set an indicator to plain, squiggle or TT.

Parameters:
  • indic (int) –
  • style (int) –


IndicatorSetUnder(self, indic, under)

Set an indicator to draw under text or over(default).

Parameters:
  • indic (int) –
  • under (bool) –


IndicatorStart(self, indicator, position)

Where does a particular indicator start?

Parameters:
  • indicator (int) –
  • position (int) –
Return type:

int



IndicatorValueAt(self, indicator, position)

What value does a particular indicator have at at a position?

Parameters:
  • indicator (int) –
  • position (int) –
Return type:

int



InsertText(self, pos, text)

Insert string at a position.

Parameters:
  • pos (int) –
  • text (string) –


InsertTextRaw(self, pos, text)

Insert string at a position.

Parameters:
  • pos (int) –
  • text (int) –


IsEditable(self)

Returns True if the controls contents may be edited by user (note that it always can be changed by the program).

In other words, this functions returns True if the control hasn’t been put in read-only mode by a previous call to SetEditable .

Return type:bool


IsEmpty(self)

Returns True if the control is currently empty.

This is the same as GetValue .empty() but can be much more efficient for the multiline controls containing big amounts of text.

Return type:bool

New in version 2.7.1.



IsModified(self)
Return type:bool


LineCopy(self)

Copy the line containing the caret.



LineCut(self)

Cut the line containing the caret.



LineDelete(self)

Delete the line containing the caret.



LineDown(self)

Move caret down one line.



LineDownExtend(self)

Move caret down one line extending selection to new caret position.



LineDownRectExtend(self)

Move caret down one line, extending rectangular selection to new caret position.



LineDuplicate(self)

Duplicate the current line.



LineEnd(self)

Move caret to last position on line.



LineEndDisplay(self)

Move caret to last position on display line.



LineEndDisplayExtend(self)

Move caret to last position on display line extending selection to new caret position.



LineEndExtend(self)

Move caret to last position on line extending selection to new caret position.



LineEndRectExtend(self)

Move caret to last position on line, extending rectangular selection to new caret position.



LineEndWrap(self)


LineEndWrapExtend(self)


LineFromPosition(self, pos)

Retrieve the line containing a position.

Parameters:pos (int) –
Return type:int


LineLength(self, line)

How many characters are on a line, including end of line characters?

Parameters:line (int) –
Return type:int


LineScroll(self, columns, lines)

Scroll horizontally and vertically.

Parameters:
  • columns (int) –
  • lines (int) –


LineScrollDown(self)

Scroll the document down, keeping the caret visible.



LineScrollUp(self)

Scroll the document up, keeping the caret visible.



LineTranspose(self)

Switch the current line with the previous.



LineUp(self)

Move caret up one line.



LineUpExtend(self)

Move caret up one line extending selection to new caret position.



LineUpRectExtend(self)

Move caret up one line, extending rectangular selection to new caret position.



LinesJoin(self)

Join the lines in the target.



LinesOnScreen(self)

Retrieves the number of lines completely visible.

Return type:int


LinesSplit(self, pixelWidth)

Split the lines in the target into lines that are less wide than pixelWidth where possible.

Parameters:pixelWidth (int) –


LoadFile(self, filename)

Load the contents of filename into the editor.

Parameters:filename (string) –
Return type:bool


LowerCase(self)

Transform the selection to lower case.



MarginGetStyle(self, line)

Get the style number for the text margin for a line.

Parameters:line (int) –
Return type:int


MarginGetStyleOffset(self)

Get the start of the range of style numbers used for margin text.

Return type:int


MarginGetStyles(self, line)

Get the styles in the text margin for a line.

Parameters:line (int) –
Return type:string


MarginGetText(self, line)

Get the text in the text margin for a line.

Parameters:line (int) –
Return type:string


MarginSetStyle(self, line, style)

Set the style number for the text margin for a line.

Parameters:
  • line (int) –
  • style (int) –


MarginSetStyleOffset(self, style)

Get the start of the range of style numbers used for margin text.

Parameters:style (int) –


MarginSetStyles(self, line, styles)

Set the style in the text margin for a line.

Parameters:
  • line (int) –
  • styles (string) –


MarginSetText(self, line, text)

Set the text in the text margin for a line.

Parameters:
  • line (int) –
  • text (string) –


MarginTextClearAll(self)

Clear the margin text on all lines.



MarkDirty(self)


MarkerAdd(self, line, markerNumber)

Add a marker to a line, returning an ID which can be used to find or delete the marker.

Parameters:
  • line (int) –
  • markerNumber (int) –
Return type:

int



MarkerAddSet(self, line, set)

Add a set of markers to a line.

Parameters:
  • line (int) –
  • set (int) –


MarkerDefine(self, markerNumber, markerSymbol, foreground=NullColour, background=NullColour)

Set the symbol used for a particular marker number, and optionally the fore and background colours.

Parameters:
  • markerNumber (int) –
  • markerSymbol (int) –
  • foreground (wx.Colour) –
  • background (wx.Colour) –


MarkerDefineBitmap(self, markerNumber, bmp)

Define a marker from a bitmap.

Parameters:


MarkerDefineRGBAImage(self, markerNumber, pixels)

Define a marker from RGBA data.

It has the width and height from RGBAImageSetWidth/Height

Parameters:
  • markerNumber (int) –
  • pixels (int) –


MarkerDelete(self, line, markerNumber)

Delete a marker from a line.

Parameters:
  • line (int) –
  • markerNumber (int) –


MarkerDeleteAll(self, markerNumber)

Delete all markers with a particular number from all lines.

Parameters:markerNumber (int) –


MarkerDeleteHandle(self, handle)

Delete a marker.

Parameters:handle (int) –


MarkerEnableHighlight(self, enabled)

Enable/disable highlight for current folding bloc (smallest one that contains the caret)

Parameters:enabled (bool) –


MarkerGet(self, line)

Get a bit mask of all the markers set on a line.

Parameters:line (int) –
Return type:int


MarkerLineFromHandle(self, handle)

Retrieve the line number at which a particular marker is located.

Parameters:handle (int) –
Return type:int


MarkerNext(self, lineStart, markerMask)

Find the next line at or after lineStart that includes a marker in mask.

Return -1 when no more lines.

Parameters:
  • lineStart (int) –
  • markerMask (int) –
Return type:

int



MarkerPrevious(self, lineStart, markerMask)

Find the previous line before lineStart that includes a marker in mask.

Parameters:
  • lineStart (int) –
  • markerMask (int) –
Return type:

int



MarkerSetAlpha(self, markerNumber, alpha)

Set the alpha used for a marker that is drawn in the text area, not the margin.

Parameters:
  • markerNumber (int) –
  • alpha (int) –


MarkerSetBackground(self, markerNumber, back)

Set the background colour used for a particular marker number.

Parameters:
  • markerNumber (int) –
  • back (wx.Colour) –


MarkerSetBackgroundSelected(self, markerNumber, back)

Set the background colour used for a particular marker number when its folding block is selected.

Parameters:
  • markerNumber (int) –
  • back (wx.Colour) –


MarkerSetForeground(self, markerNumber, fore)

Set the foreground colour used for a particular marker number.

Parameters:
  • markerNumber (int) –
  • fore (wx.Colour) –


MoveCaretInsideView(self)

Move the caret inside current view if it’s not there already.



MoveSelectedLinesDown(self)

Move the selected lines down one line, shifting the line below before the selection.



MoveSelectedLinesUp(self)

Move the selected lines up one line, shifting the line above after the selection.



NewLine(self)

Insert a new line, may use a CRLF, CR or LF depending on EOL mode.



PageDown(self)

Move caret one page down.



PageDownExtend(self)

Move caret one page down extending selection to new caret position.



PageDownRectExtend(self)

Move caret one page down, extending rectangular selection to new caret position.



PageUp(self)

Move caret one page up.



PageUpExtend(self)

Move caret one page up extending selection to new caret position.



PageUpRectExtend(self)

Move caret one page up, extending rectangular selection to new caret position.



ParaDown(self)

Move caret between paragraphs (delimited by empty lines).



ParaDownExtend(self)


ParaUp(self)


ParaUpExtend(self)


Paste(self)

Paste the contents of the clipboard into the document replacing the selection.



PointFromPosition(self, pos)

Retrieve the point in the window where a position is displayed.

Parameters:pos (int) –
Return type: wx.Point


PositionAfter(self, pos)

Given a valid document position, return the next position taking code page into account.

Maximum value returned is the last position in the document.

Parameters:pos (int) –
Return type:int


PositionBefore(self, pos)

Given a valid document position, return the previous position taking code page into account.

Returns 0 if passed 0.

Parameters:pos (int) –
Return type:int


PositionFromLine(self, line)

Retrieve the position at the start of a line.

Parameters:line (int) –
Return type:int


PositionFromPoint(self, pt)

Find the position from a point within the window.

Parameters:pt (wx.Point) –
Return type:int


PositionFromPointClose(self, x, y)

Find the position from a point within the window but return INVALID_POSITION if not close to text.

Parameters:
  • x (int) –
  • y (int) –
Return type:

int



PositionToCoords(self, pos)

Converts given text position to client coordinates in pixels.

This function allows to find where is the character at the given position displayed in the text control.

Parameters:pos (long) – Text position in 0 to GetLastPosition range (inclusive).
Return type: wx.Point
Returns:On success returns a wx.Point which contains client coordinates for the given position in pixels, otherwise returns wx.DefaultPosition .

New in version 2.9.3.

Availability

Only available for MSW, GTK . Additionally, wxGTK only implements this method for multiline controls and wx.DefaultPosition is always returned for the single line ones.



PositionToXY(self, pos)
Parameters:pos (long) –
Return type:tuple
Returns:( bool, x, y )


PrivateLexerCall(self, operation, pointer)

For private communication between an application and a known lexer.

Parameters:
  • operation (int) –
  • pointer


PropertyNames(self)

Retrieve a ‘

‘ separated list of properties understood by the current lexer.

Return type:string


PropertyType(self, name)

Retrieve the type of a property.

Parameters:name (string) –
Return type:int


RGBAImageSetHeight(self, height)

Set the height for future RGBA image data.

Parameters:height (int) –


RGBAImageSetWidth(self, width)

Set the width for future RGBA image data.

Parameters:width (int) –


Redo(self)

Redoes the next action on the undo history.



RegisterImage(self, type, bmp)

Register an image for use in autocompletion lists.

Parameters:


RegisterRGBAImage(self, type, pixels)

Register an RGBA image for use in autocompletion lists.

It has the width and height from RGBAImageSetWidth/Height

Parameters:
  • type (int) –
  • pixels (int) –


ReleaseDocument(self, docPointer)

Release a reference to the document, deleting document if it fades to black.

Parameters:docPointer


Remove(self, from_, to_)

Removes the text starting at the first given position up to (but not including) the character at the last position.

This function puts the current insertion point position at to as a side effect.

Parameters:
  • from_ (long) –
  • to_ (long) –

The first position.

The last position.



Replace(self, from_, to_, value)

Replaces the text starting at the first position up to (but not including) the character at the last position with the given text.

This function puts the current insertion point position at to as a side effect.

Parameters:
  • from_ (long) –
  • to_ (long) –
  • value (string) – The value to replace the existing text with.

The first position.

The last position.



ReplaceSelection(self, text)

Replace the selected text with the argument text.

Parameters:text (string) –


ReplaceTarget(self, text)

Replace the target text with the argument text.

Text is counted so it can contain NULs. Returns the length of the replacement text.

Parameters:text (string) –
Return type:int


ReplaceTargetRE(self, text)

Replace the target text with the argument text after \d processing.

Text is counted so it can contain NULs. Looks for \d where d is between 1 and 9 and replaces these with the strings matched in the last search operation which were surrounded by ( and ). Returns the length of the replacement text including any change caused by processing the \d patterns.

Parameters:text (string) –
Return type:int


RotateSelection(self)

Set the main selection to the next selection.



SaveFile(self, filename)

Write the contents of the editor to filename.

Parameters:filename (string) –
Return type:bool


ScrollToColumn(self, column)

Scroll enough to make the given column visible.

Parameters:column (int) –


ScrollToEnd(self)

Scroll to end of document.



ScrollToLine(self, line)

Scroll enough to make the given line visible.

Parameters:line (int) –


ScrollToStart(self)

Scroll to start of document.



SearchAnchor(self)

Sets the current caret position to be the search anchor.



SearchInTarget(self, text)

Search for a counted string in the target and set the target to the found range.

Text is counted so it can contain NULs. Returns length of range or -1 for failure in which case target is not moved.

Parameters:text (string) –
Return type:int


SearchNext(self, flags, text)

Find some text starting at the search anchor.

Does not ensure the selection is visible.

Parameters:
  • flags (int) –
  • text (string) –
Return type:

int



SearchPrev(self, flags, text)

Find some text starting at the search anchor and moving backwards.

Does not ensure the selection is visible.

Parameters:
  • flags (int) –
  • text (string) –
Return type:

int



SelectAll(self)

Select all the text in the document.



SelectNone(self)

Deselects selected text in the control.

New in version 2.9.5.



SelectionDuplicate(self)

Duplicate the selection.

If selection empty duplicate the line containing the caret.



SelectionIsRectangle(self)

Is the selection rectangular? The alternative is the more common stream selection.

Return type:bool


SendMsg(self, msg, wp=0, lp=0)

Send a message to Scintilla.

Parameters:
  • msg (int) –
  • wp (wx.UIntPtr) –
  • lp (wx.IntPtr) –
Return type:

wx.IntPtr



SetAdditionalCaretForeground(self, fore)

Set the foreground colour of additional carets.

Parameters:fore (wx.Colour) –


Set whether additional carets will blink.

Parameters:additionalCaretsBlink (bool) –


SetAdditionalCaretsVisible(self, additionalCaretsBlink)

Set whether additional carets are visible.

Parameters:additionalCaretsBlink (bool) –


SetAdditionalSelAlpha(self, alpha)

Set the alpha of the selection.

Parameters:alpha (int) –


SetAdditionalSelBackground(self, back)

Set the background colour of additional selections.

Must have previously called SetSelBack with non-zero first argument for this to have an effect.

Parameters:back (wx.Colour) –


SetAdditionalSelForeground(self, fore)

Set the foreground colour of additional selections.

Must have previously called SetSelFore with non-zero first argument for this to have an effect.

Parameters:fore (wx.Colour) –


SetAdditionalSelectionTyping(self, additionalSelectionTyping)

Set whether typing can be performed into multiple selections.

Parameters:additionalSelectionTyping (bool) –


SetAnchor(self, posAnchor)

Set the selection anchor to a position.

The anchor is the opposite end of the selection from the caret.

Parameters:posAnchor (int) –


SetBackSpaceUnIndents(self, bsUnIndents)

Sets whether a backspace pressed when caret is within indentation unindents.

Parameters:bsUnIndents (bool) –


SetBufferedDraw(self, buffered)

If drawing is buffered then each line of text is drawn into a bitmap buffer before drawing it to the screen to avoid flicker.

Parameters:buffered (bool) –


SetCaretForeground(self, fore)

Set the foreground colour of the caret.

Parameters:fore (wx.Colour) –


SetCaretLineBackAlpha(self, alpha)

Set background alpha of the caret line.

Parameters:alpha (int) –


SetCaretLineBackground(self, back)

Set the colour of the background of the line containing the caret.

Parameters:back (wx.Colour) –


SetCaretLineVisible(self, show)

Display the background of the line containing the caret in a different colour.

Parameters:show (bool) –


SetCaretPeriod(self, periodMilliseconds)

Get the time in milliseconds that the caret is on and off.

0 = steady on.

Parameters:periodMilliseconds (int) –


SetCaretSticky(self, useCaretStickyBehaviour)

Stop the caret preferred x position changing when the user types.

Parameters:useCaretStickyBehaviour (int) –


SetCaretStyle(self, caretStyle)

Set the style of the caret to be drawn.

Parameters:caretStyle (int) –


SetCaretWidth(self, pixelWidth)

Set the width of the insert mode caret.

Parameters:pixelWidth (int) –


SetCharsDefault(self)

Reset the set of characters for whitespace and word characters to the defaults.



SetCodePage(self, codePage)

Set the code page used to interpret the bytes of the document as characters.

Parameters:codePage (int) –


SetControlCharSymbol(self, symbol)

Change the way control characters are displayed: If symbol is < 32, keep the drawn way, else, use the given character.

Parameters:symbol (int) –


SetCurrentPos(self, pos)

Sets the position of the caret.

Parameters:pos (int) –


SetDefaultStyle(self, style)
Parameters:style (wx.TextAttr) –
Return type:bool


SetDocPointer(self, docPointer)

Change the document object used.

Parameters:docPointer


SetEOLMode(self, eolMode)

Set the current end of line mode.

Parameters:eolMode (int) –


SetEdgeColour(self, edgeColour)

Change the colour used in edge indication.

Parameters:edgeColour (wx.Colour) –


SetEdgeColumn(self, column)

Set the column number of the edge.

If text goes past the edge then it is highlighted.

Parameters:column (int) –


SetEdgeMode(self, mode)

The edge may be displayed by a line (EDGE_LINE) or by highlighting text that goes beyond it (EDGE_BACKGROUND) or not displayed at all (EDGE_NONE).

Parameters:mode (int) –


SetEditable(self, editable)

Makes the text item editable or read-only, overriding the wx.TE_READONLY flag.

Parameters:editable (bool) – If True, the control is editable. If False, the control is read-only.

See also

IsEditable



SetEmptySelection(self, pos)

Set caret to a position, while removing any existing selection.

Parameters:pos (int) –


SetEndAtLastLine(self, endAtLastLine)

Sets the scroll range so that maximum scroll position has the last line at the bottom of the view (default).

Setting this to False allows scrolling one page below the last line.

Parameters:endAtLastLine (bool) –


SetExtraAscent(self, extraAscent)

Set extra ascent for each line.

Parameters:extraAscent (int) –


SetExtraDescent(self, extraDescent)

Set extra descent for each line.

Parameters:extraDescent (int) –


SetFirstVisibleLine(self, lineDisplay)

Scroll so that a display line is at the top of the display.

Parameters:lineDisplay (int) –


SetFoldExpanded(self, line, expanded)

Show the children of a header line.

Parameters:
  • line (int) –
  • expanded (bool) –


SetFoldFlags(self, flags)

Set some style options for folding.

Parameters:flags (int) –


SetFoldLevel(self, line, level)

Set the fold level of a line.

This encodes an integer level along with flags indicating whether the line is a header and whether it is effectively white space.

Parameters:
  • line (int) –
  • level (int) –


SetFoldMarginColour(self, useSetting, back)

Set the colours used as a chequerboard pattern in the fold margin.

Parameters:


SetFoldMarginHiColour(self, useSetting, fore)
Parameters:


SetHScrollBar(self, bar)

Set the horizontal scrollbar to use instead of the ont that’s built-in.

Parameters:bar (wx.ScrollBar) –


SetHighlightGuide(self, column)

Set the highlighted indentation guide column.

0 = no highlighted guide.

Parameters:column (int) –


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 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 OS X.

Parameters:hint (string) –
Return type:bool

New in version 2.9.0.

Note

For the platforms without native hints support (and currently only the MSW port does have it and even there it is only used under Windows Vista and later only), the implementation has several known limitations. Notably, the hint display will not be properly updated if you change wx.TextEntry contents programmatically when the hint is displayed using methods other than SetValue or ChangeValue or others which use them internally (e.g. Clear ). In other words, currently you should avoid calling methods such as WriteText or Replace when using hints and the text control is empty.

Note

Hints can only be used for single line text controls, native multi-line text controls don’t support hints under any platform and hence wxWidgets doesn’t provide them neither.



SetHotspotActiveBackground(self, useSetting, back)

Set a back colour for active hotspots.

Parameters:


SetHotspotActiveForeground(self, useSetting, fore)

Set a fore colour for active hotspots.

Parameters:


SetHotspotActiveUnderline(self, underline)

Enable / Disable underlining active hotspots.

Parameters:underline (bool) –


SetHotspotSingleLine(self, singleLine)

Limit hotspots to single line so hotspots on two lines don’t merge.

Parameters:singleLine (bool) –


SetIdentifier(self, identifier)

Set the identifier reported as idFrom in notification messages.

Parameters:identifier (int) –


SetIndent(self, indentSize)

Set the number of spaces used for one level of indentation.

Parameters:indentSize (int) –


SetIndentationGuides(self, indentView)

Show or hide indentation guides.

Parameters:indentView (int) –


SetIndicatorCurrent(self, indicator)

Set the indicator used for IndicatorFillRange and IndicatorClearRange.

Parameters:indicator (int) –


SetIndicatorValue(self, value)

Set the value used for IndicatorFillRange.

Parameters:value (int) –


SetInsertionPoint(self, pos)

Sets the insertion point at the given position.

Parameters:pos (long) – Position to set, in the range from 0 to GetLastPosition inclusive.


SetInsertionPointEnd(self)

Sets the insertion point at the end of the text control.

This is equivalent to calling wx.TextCtrl.SetInsertionPoint with wx.TextCtrl.GetLastPosition argument.



SetKeyWords(self, keywordSet, keyWords)

Set up the key words used by the lexer.

Parameters:
  • keywordSet (int) –
  • keyWords (string) –


SetKeysUnicode(self, keysUnicode)

Always interpret keyboard input as Unicode.

Parameters:keysUnicode (bool) –


SetLastKeydownProcessed(self, val)
Parameters:val (bool) –


SetLayoutCache(self, mode)

Sets the degree of caching of layout information.

Parameters:mode (int) –


SetLexer(self, lexer)

Set the lexing language of the document.

Parameters:lexer (int) –


SetLexerLanguage(self, language)

Set the lexing language of the document based on string name.

Parameters:language (string) –


SetLineIndentation(self, line, indentSize)

Change the indentation of a line to a number of columns.

Parameters:
  • line (int) –
  • indentSize (int) –


SetLineState(self, line, state)

Used to hold extra styling information for each line.

Parameters:
  • line (int) –
  • state (int) –


SetMainSelection(self, selection)

Set the main selection.

Parameters:selection (int) –


SetMarginCursor(self, margin, cursor)

Set the cursor shown when the mouse is inside a margin.

Parameters:
  • margin (int) –
  • cursor (int) –


SetMarginLeft(self, pixelWidth)

Sets the size in pixels of the left margin.

Parameters:pixelWidth (int) –


SetMarginMask(self, margin, mask)

Set a mask that determines which markers are displayed in a margin.

Parameters:
  • margin (int) –
  • mask (int) –


SetMarginOptions(self, marginOptions)

Set the margin options.

Parameters:marginOptions (int) –


SetMarginRight(self, pixelWidth)

Sets the size in pixels of the right margin.

Parameters:pixelWidth (int) –


SetMarginSensitive(self, margin, sensitive)

Make a margin sensitive or insensitive to mouse clicks.

Parameters:
  • margin (int) –
  • sensitive (bool) –


SetMarginType(self, margin, marginType)

Set a margin to be either numeric or symbolic.

Parameters:
  • margin (int) –
  • marginType (int) –


SetMarginWidth(self, margin, pixelWidth)

Set the width of a margin to a width expressed in pixels.

Parameters:
  • margin (int) –
  • pixelWidth (int) –


SetMargins(self, left, right)

Set the left and right margin in the edit area, measured in pixels.

Parameters:
  • left (int) –
  • right (int) –


SetMaxLength(self, len)

This function sets the maximum number of characters the user can enter into the control.

In other words, it allows to limit the text value length to len not counting the terminating NUL character.

If len is 0, the previously set max length limit, if any, is discarded and the user may enter as much text as the underlying native text control widget supports (typically at least 32Kb). If the user tries to enter more characters into the text control when it already is filled up to the maximal length, a wxEVT_TEXT_MAXLEN event is sent to notify the program about it (giving it the possibility to show an explanatory message, for example) and the extra input is discarded.

Note that in wxGTK this function may only be used with single line text controls.

Parameters:len (long) –


SetModEventMask(self, mask)

Set which document modification events are sent to the container.

Parameters:mask (int) –


SetModified(self, modified)

Marks the control as being modified by the user or not.

Parameters:modified (bool) –

See also

MarkDirty , DiscardEdits



SetMouseDownCaptures(self, captures)

Set whether the mouse is captured when its button is pressed.

Parameters:captures (bool) –


SetMouseDwellTime(self, periodMilliseconds)

Sets the time the mouse must sit still to generate a mouse dwell event.

Parameters:periodMilliseconds (int) –


SetMultiPaste(self, multiPaste)

Change the effect of pasting when there are multiple selections.

Parameters:multiPaste (int) –


SetMultipleSelection(self, multipleSelection)

Set whether multiple selections can be made.

Parameters:multipleSelection (bool) –


SetOvertype(self, overtype)

Set to overtype (True) or insert mode.

Parameters:overtype (bool) –


SetPasteConvertEndings(self, convert)

Enable/Disable convert-on-paste for line endings.

Parameters:convert (bool) –


SetPositionCacheSize(self, size)

Set number of entries in position cache.

Parameters:size (int) –


SetPrintColourMode(self, mode)

Modify colours when printing for clearer printed text.

Parameters:mode (int) –


SetPrintMagnification(self, magnification)

Sets the print magnification added to the point size of each style for printing.

Parameters:magnification (int) –


SetPrintWrapMode(self, mode)

Set printing to line wrapped (SC_WRAP_WORD) or not line wrapped (SC_WRAP_NONE).

Parameters:mode (int) –


SetProperty(self, key, value)

Set up a value that may be used by a lexer for some optional feature.

Parameters:
  • key (string) –
  • value (string) –


SetPunctuationChars(self, characters)

Set the set of characters making up punctuation characters Should be called after SetWordChars.

Parameters:characters (string) –


SetReadOnly(self, readOnly)

Set to read only or read write.

Parameters:readOnly (bool) –


SetRectangularSelectionAnchor(self, posAnchor)
Parameters:posAnchor (int) –


SetRectangularSelectionAnchorVirtualSpace(self, space)
Parameters:space (int) –


SetRectangularSelectionCaret(self, pos)
Parameters:pos (int) –


SetRectangularSelectionCaretVirtualSpace(self, space)
Parameters:space (int) –


SetRectangularSelectionModifier(self, modifier)

On GTK+, allow selecting the modifier key to use for mouse-based rectangular selection.

Often the window manager requires Alt+Mouse Drag for moving windows. Valid values are SCMOD_CTRL(default), SCMOD_ALT, or SCMOD_SUPER.

Parameters:modifier (int) –


SetSTCCursor(self, cursorType)

Sets the cursor to one of the SC_CURSOR values.

Parameters:cursorType (int) –


SetSTCFocus(self, focus)

Change internal focus flag.

Parameters:focus (bool) –


SetSavePoint(self)

Remember the current position in the undo history as the position at which the document was saved.



SetScrollWidth(self, pixelWidth)

Sets the document width assumed for scrolling.

Parameters:pixelWidth (int) –


SetScrollWidthTracking(self, tracking)

Sets whether the maximum width line displayed is used to set scroll width.

Parameters:tracking (bool) –


SetSearchFlags(self, flags)

Set the search flags used by SearchInTarget.

Parameters:flags (int) –


SetSelAlpha(self, alpha)

Set the alpha of the selection.

Parameters:alpha (int) –


SetSelBackground(self, useSetting, back)

Set the background colour of the main and additional selections and whether to use this setting.

Parameters:


SetSelEOLFilled(self, filled)

Set the selection to have its end of line filled or not.

Parameters:filled (bool) –


SetSelForeground(self, useSetting, fore)

Set the foreground colour of the main and additional selections and whether to use this setting.

Parameters:


SetSelection(self, from_, to_)

Selects the text starting at the first position up to (but not including) the character at the last position.

If both parameters are equal to -1 all text in the control is selected.

Notice that the insertion point will be moved to from by this function.

Parameters:
  • from_ (long) –
  • to_ (long) –

The first position.

The last position.

See also

SelectAll



SetSelectionEnd(self, pos)

Sets the position that ends the selection - this becomes the currentPosition.

Parameters:pos (int) –


SetSelectionMode(self, mode)

Set the selection mode to stream (SC_SEL_STREAM) or rectangular (SC_SEL_RECTANGLE/SC_SEL_THIN) or by lines (SC_SEL_LINES).

Parameters:mode (int) –


SetSelectionNAnchor(self, selection, posAnchor)
Parameters:
  • selection (int) –
  • posAnchor (int) –


SetSelectionNAnchorVirtualSpace(self, selection, space)
Parameters:
  • selection (int) –
  • space (int) –


SetSelectionNCaret(self, selection, pos)
Parameters:
  • selection (int) –
  • pos (int) –


SetSelectionNCaretVirtualSpace(self, selection, space)
Parameters:
  • selection (int) –
  • space (int) –


SetSelectionNEnd(self, selection, pos)

Sets the position that ends the selection - this becomes the currentPosition.

Parameters:
  • selection (int) –
  • pos (int) –


SetSelectionNStart(self, selection, pos)

Sets the position that starts the selection - this becomes the anchor.

Parameters:
  • selection (int) –
  • pos (int) –


SetSelectionStart(self, pos)

Sets the position that starts the selection - this becomes the anchor.

Parameters:pos (int) –


SetStatus(self, statusCode)

Change error status - 0 = wx.OK.

Parameters:statusCode (int) –


SetStyle(self, start, end, style)
Parameters:
  • start (long) –
  • end (long) –
  • style (wx.TextAttr) –
Return type:

bool



SetStyleBits(self, bits)

Divide each styling byte into lexical class bits (default: 5) and indicator bits (default: 3).

If a lexer requires more than 32 lexical states, then this is used to expand the possible states.

Parameters:bits (int) –


SetStyleBytes(self, length, styleBytes)

Set the styles for a segment of the document.

Parameters:
  • length (int) –
  • styleBytes (int) –


SetStyling(self, length, style)

Change style from current styling position for length characters to a style and move the current styling position to after this newly styled segment.

Parameters:
  • length (int) –
  • style (int) –


SetTabIndents(self, tabIndents)

Sets whether a tab pressed when caret is within indentation indents.

Parameters:tabIndents (bool) –


SetTabWidth(self, tabWidth)

Change the visible size of a tab to be a multiple of the width of a space character.

Parameters:tabWidth (int) –


SetTargetEnd(self, pos)

Sets the position that ends the target which is used for updating the document without affecting the scroll position.

Parameters:pos (int) –


SetTargetStart(self, pos)

Sets the position that starts the target which is used for updating the document without affecting the scroll position.

Parameters:pos (int) –


SetTechnology(self, technology)

Set the technology used.

Parameters:technology (int) –


SetText(self, text)

Replace the contents of the document with the argument text.

Parameters:text (string) –


SetTextRaw(self, text)

Replace the contents of the document with the argument text.

Parameters:text (int) –


SetTwoPhaseDraw(self, twoPhase)

In twoPhaseDraw mode, drawing is performed in two phases, first the background and then the foreground.

This avoids chopping off characters that overlap the next run.

Parameters:twoPhase (bool) –


SetUndoCollection(self, collectUndo)

Choose between collecting actions into the undo history and discarding them.

Parameters:collectUndo (bool) –


SetUseHorizontalScrollBar(self, show)

Show or hide the horizontal scroll bar.

Parameters:show (bool) –


SetUseTabs(self, useTabs)

Indentation will only use space characters if useTabs is False, otherwise it will use a combination of tabs and spaces.

Parameters:useTabs (bool) –


SetUseVerticalScrollBar(self, show)

Show or hide the vertical scroll bar.

Parameters:show (bool) –


SetVScrollBar(self, bar)

Set the vertical scrollbar to use instead of the ont that’s built-in.

Parameters:bar (wx.ScrollBar) –


SetValue(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 SetValue .

The insertion point is set to the start of the control (i.e. position 0) by this function.

Note that, unlike most other functions changing the controls values, this function generates a wxEVT_TEXT event. To avoid this you can use ChangeValue instead.

Parameters:value (string) – The new value to set. It may contain newline characters if the text control is multi-line.


SetViewEOL(self, visible)

Make the end of line characters visible or invisible.

Parameters:visible (bool) –


SetViewWhiteSpace(self, viewWS)

Make white space characters invisible, always visible or visible outside indentation.

Parameters:viewWS (int) –


SetVirtualSpaceOptions(self, virtualSpaceOptions)
Parameters:virtualSpaceOptions (int) –


SetVisiblePolicy(self, visiblePolicy, visibleSlop)

Set the way the display area is determined when a particular line is to be moved to by Find, FindNext, GotoLine, etc.

Parameters:
  • visiblePolicy (int) –
  • visibleSlop (int) –


SetWhitespaceBackground(self, useSetting, back)

Set the background colour of all whitespace and whether to use this setting.

Parameters:


SetWhitespaceChars(self, characters)

Set the set of characters making up whitespace for when moving or selecting by word.

Should be called after SetWordChars.

Parameters:characters (string) –


SetWhitespaceForeground(self, useSetting, fore)

Set the foreground colour of all whitespace and whether to use this setting.

Parameters:


SetWhitespaceSize(self, size)

Set the size of the dots used to mark space characters.

Parameters:size (int) –


SetWordChars(self, characters)

Set the set of characters making up words for when moving or selecting by word.

First sets defaults like SetCharsDefault.

Parameters:characters (string) –


SetWrapIndentMode(self, mode)

Sets how wrapped sublines are placed.

Default is fixed.

Parameters:mode (int) –


SetWrapMode(self, mode)

Sets whether text is word wrapped.

Parameters:mode (int) –


SetWrapStartIndent(self, indent)

Set the start indent for wrapped lines.

Parameters:indent (int) –


SetWrapVisualFlags(self, wrapVisualFlags)

Set the display mode of visual flags for wrapped lines.

Parameters:wrapVisualFlags (int) –


SetWrapVisualFlagsLocation(self, wrapVisualFlagsLocation)

Set the location of visual flags for wrapped lines.

Parameters:wrapVisualFlagsLocation (int) –


SetXCaretPolicy(self, caretPolicy, caretSlop)

Set the way the caret is kept visible when going sideways.

The exclusion zone is given in pixels.

Parameters:
  • caretPolicy (int) –
  • caretSlop (int) –


SetXOffset(self, newOffset)

Get and Set the xOffset (ie, horizontal scroll position).

Parameters:newOffset (int) –


SetYCaretPolicy(self, caretPolicy, caretSlop)

Set the way the line the caret is on is kept visible.

The exclusion zone is given in lines.

Parameters:
  • caretPolicy (int) –
  • caretSlop (int) –


SetZoom(self, zoom)

Set the zoom level.

This number of points is added to the size of all fonts. It may be positive to magnify or negative to reduce.

Parameters:zoom (int) –


ShowLines(self, lineStart, lineEnd)

Make a range of lines visible.

Parameters:
  • lineStart (int) –
  • lineEnd (int) –


ShowPosition(self, pos)
Parameters:pos (long) –


StartRecord(self)

Start notifying the container of all key presses and commands.



StartStyling(self, pos, mask)

Set the current styling position to pos and the styling mask to mask.

The styling mask can be used to protect some bits in each styling byte from modification.

Parameters:
  • pos (int) –
  • mask (int) –


StopRecord(self)

Stop notifying the container of all key presses and commands.



StutteredPageDown(self)

Move caret to bottom of page, or one page down if already at bottom of page.



StutteredPageDownExtend(self)

Move caret to bottom of page, or one page down if already at bottom of page, extending selection to new caret position.



StutteredPageUp(self)

Move caret to top of page, or one page up if already at top of page.



StutteredPageUpExtend(self)

Move caret to top of page, or one page up if already at top of page, extending selection to new caret position.



StyleClearAll(self)

Clear all the styles and make equivalent to the global default style.



StyleGetBackground(self, style)

Get the background colour of a style.

Parameters:style (int) –
Return type: wx.Colour


StyleGetBold(self, style)

Get is a style bold or not.

Parameters:style (int) –
Return type:bool


StyleGetCase(self, style)

Get is a style mixed case, or to force upper or lower case.

Parameters:style (int) –
Return type:int


StyleGetChangeable(self, style)

Get is a style changeable or not (read only).

Experimental feature, currently buggy.

Parameters:style (int) –
Return type:bool


StyleGetCharacterSet(self, style)

Get the character set of the font in a style.

Parameters:style (int) –
Return type:int


StyleGetEOLFilled(self, style)

Get is a style to have its end of line filled or not.

Parameters:style (int) –
Return type:bool


StyleGetFaceName(self, style)

Get the font facename of a style.

Parameters:style (int) –
Return type:string


StyleGetFont(self, style)

Get the font of a style.

Parameters:style (int) –
Return type: wx.Font


StyleGetForeground(self, style)

Get the foreground colour of a style.

Parameters:style (int) –
Return type: wx.Colour


StyleGetHotSpot(self, style)

Get is a style a hotspot or not.

Parameters:style (int) –
Return type:bool


StyleGetItalic(self, style)

Get is a style italic or not.

Parameters:style (int) –
Return type:bool


StyleGetSize(self, style)

Get the size of characters of a style.

Parameters:style (int) –
Return type:int


StyleGetSizeFractional(self, style)

Get the size of characters of a style in points multiplied by 100.

Parameters:style (int) –
Return type:int


StyleGetUnderline(self, style)

Get is a style underlined or not.

Parameters:style (int) –
Return type:bool


StyleGetVisible(self, style)

Get is a style visible or not.

Parameters:style (int) –
Return type:bool


StyleGetWeight(self, style)

Get the weight of characters of a style.

Parameters:style (int) –
Return type:int


StyleResetDefault(self)

Reset the default style to its state at startup.



StyleSetBackground(self, style, back)

Set the background colour of a style.

Parameters:


StyleSetBold(self, style, bold)

Set a style to be bold or not.

Parameters:
  • style (int) –
  • bold (bool) –


StyleSetCase(self, style, caseForce)

Set a style to be mixed case, or to force upper or lower case.

Parameters:
  • style (int) –
  • caseForce (int) –


StyleSetChangeable(self, style, changeable)

Set a style to be changeable or not (read only).

Experimental feature, currently buggy.

Parameters:
  • style (int) –
  • changeable (bool) –


StyleSetCharacterSet(self, style, characterSet)

Set the character set of the font in a style.

Converts the Scintilla character set values to a FontEncoding.

Parameters:
  • style (int) –
  • characterSet (int) –


StyleSetEOLFilled(self, style, filled)

Set a style to have its end of line filled or not.

Parameters:
  • style (int) –
  • filled (bool) –


StyleSetFaceName(self, style, fontName)

Set the font of a style.

Parameters:
  • style (int) –
  • fontName (string) –


StyleSetFont(self, styleNum, font)

Set style size, face, bold, italic, and underline attributes from a wx.Font‘s attributes.

Parameters:
  • styleNum (int) –
  • font (wx.Font) –


StyleSetFontAttr(self, styleNum, size, faceName, bold, italic, underline, encoding=FONTENCODING_DEFAULT)

Set all font style attributes at once.

Parameters:
  • styleNum (int) –
  • size (int) –
  • faceName (string) –
  • bold (bool) –
  • italic (bool) –
  • underline (bool) –
  • encoding (FontEncoding) –


StyleSetFontEncoding(self, style, encoding)

Set the font encoding to be used by a style.

Parameters:


StyleSetForeground(self, style, fore)

Set the foreground colour of a style.

Parameters:


StyleSetHotSpot(self, style, hotspot)

Set a style to be a hotspot or not.

Parameters:
  • style (int) –
  • hotspot (bool) –


StyleSetItalic(self, style, italic)

Set a style to be italic or not.

Parameters:
  • style (int) –
  • italic (bool) –


StyleSetSize(self, style, sizePoints)

Set the size of characters of a style.

Parameters:
  • style (int) –
  • sizePoints (int) –


StyleSetSizeFractional(self, style, caseForce)

Set the size of characters of a style.

Size is in points multiplied by 100.

Parameters:
  • style (int) –
  • caseForce (int) –


StyleSetSpec(self, styleNum, spec)

Extract style settings from a spec-string which is composed of one or more of the following comma separated elements:

bold turns on bold italic turns on italics fore:[name or #``RRGGBB]`` sets the foreground colour back:[name or #``RRGGBB]`` sets the background colour face:[facename] sets the font face name to use size:[num] sets the font size in points eol turns on eol filling underline turns on underlining

Parameters:
  • styleNum (int) –
  • spec (string) –


StyleSetUnderline(self, style, underline)

Set a style to be underlined or not.

Parameters:
  • style (int) –
  • underline (bool) –


StyleSetVisible(self, style, visible)

Set a style to be visible or not.

Parameters:
  • style (int) –
  • visible (bool) –


StyleSetWeight(self, style, weight)

Set the weight of characters of a style.

Parameters:
  • style (int) –
  • weight (int) –


SwapMainAnchorCaret(self)

Swap that caret and anchor of the main selection.



Tab(self)

If selection is empty or all on one line replace the selection with a tab character.

If more than one line selected, indent the lines.



TargetFromSelection(self)

Make the target range start and end be the same as the selection range start and end.



TextHeight(self, line)

Retrieve the height of a particular line of text in pixels.

Parameters:line (int) –
Return type:int


TextWidth(self, style, text)

Measure the pixel width of some text in a particular style.

NUL terminated text argument. Does not handle tab or control characters.

Parameters:
  • style (int) –
  • text (string) –
Return type:

int



ToggleCaretSticky(self)

Switch between sticky and non-sticky: meant to be bound to a key.



ToggleFold(self, line)

Switch a header line between expanded and contracted.

Parameters:line (int) –


Undo(self)

Undo one action in the undo history.



UpperCase(self)

Transform the selection to upper case.



UsePopUp(self, allowPopUp)

Set whether a pop up menu is displayed automatically when the user presses the wrong mouse button.

Parameters:allowPopUp (bool) –


UserListShow(self, listType, itemList)

Display a list of strings and send notification when user chooses one.

Parameters:
  • listType (int) –
  • itemList (string) –


VCHome(self)

Move caret to before first visible character on line.

If already there move to first character on line.



VCHomeExtend(self)

Like VCHome but extending selection to new caret position.



VCHomeRectExtend(self)

Move caret to before first visible character on line.

If already there move to first character on line. In either case, extend rectangular selection to new caret position.



VCHomeWrap(self)


VCHomeWrapExtend(self)


VerticalCentreCaret(self)

Centre current line in window.



VisibleFromDocLine(self, line)

Find the display line of a document line taking hidden lines into account.

Parameters:line (int) –
Return type:int


WordEndPosition(self, pos, onlyWordCharacters)

Get position of end of word.

Parameters:
  • pos (int) –
  • onlyWordCharacters (bool) –
Return type:

int



WordLeft(self)

Move caret left one word.



WordLeftEnd(self)

Move caret left one word, position cursor at end of word.



WordLeftEndExtend(self)

Move caret left one word, position cursor at end of word, extending selection to new caret position.



WordLeftExtend(self)

Move caret left one word extending selection to new caret position.



WordPartLeft(self)

Move to the previous change in capitalisation.



WordPartLeftExtend(self)

Move to the previous change in capitalisation extending selection to new caret position.



WordPartRight(self)

Move to the change next in capitalisation.



WordPartRightExtend(self)

Move to the next change in capitalisation extending selection to new caret position.



WordRight(self)

Move caret right one word.



WordRightEnd(self)

Move caret right one word, position cursor at end of word.



WordRightEndExtend(self)

Move caret right one word, position cursor at end of word, extending selection to new caret position.



WordRightExtend(self)

Move caret right one word extending selection to new caret position.



WordStartPosition(self, pos, onlyWordCharacters)

Get position of start of word.

Parameters:
  • pos (int) –
  • onlyWordCharacters (bool) –
Return type:

int



WrapCount(self, line)

The number of display lines needed to wrap a document line.

Parameters:line (int) –
Return type:int


WriteText(self, text)

Writes the text into the text control at the current insertion position.

Parameters:text (string) – Text to write to the text control.

Note

Newlines in the text string are the only control characters allowed, and they will cause appropriate line breaks. See operator<<() and AppendText for more convenient ways of writing to the window. After the write operation, the insertion point will be at the end of the inserted text, so subsequent write operations will be appended. To append text after the user may have interacted with the control, call wx.TextCtrl.SetInsertionPointEnd before writing.



XYToPosition(self, x, y)
Parameters:
  • x (long) –
  • y (long) –
Return type:

long



ZoomIn(self)

Magnify the displayed text by increasing the sizes by 1 point.



ZoomOut(self)

Make the displayed text smaller by decreasing the sizes by 1 point.


Properties



AdditionalCaretForeground

See GetAdditionalCaretForeground and SetAdditionalCaretForeground



See GetAdditionalCaretsBlink and SetAdditionalCaretsBlink



AdditionalCaretsVisible

See GetAdditionalCaretsVisible and SetAdditionalCaretsVisible



AdditionalSelAlpha

See GetAdditionalSelAlpha and SetAdditionalSelAlpha



AdditionalSelectionTyping

See GetAdditionalSelectionTyping and SetAdditionalSelectionTyping



AllLinesVisible

See GetAllLinesVisible



Anchor

See GetAnchor and SetAnchor



BackSpaceUnIndents

See GetBackSpaceUnIndents and SetBackSpaceUnIndents



BufferedDraw

See GetBufferedDraw and SetBufferedDraw



CaretForeground

See GetCaretForeground and SetCaretForeground



CaretLineBackAlpha

See GetCaretLineBackAlpha and SetCaretLineBackAlpha



CaretLineBackground

See GetCaretLineBackground and SetCaretLineBackground



CaretLineVisible

See GetCaretLineVisible and SetCaretLineVisible



CaretPeriod

See GetCaretPeriod and SetCaretPeriod



CaretSticky

See GetCaretSticky and SetCaretSticky



CaretStyle

See GetCaretStyle and SetCaretStyle



CaretWidth

See GetCaretWidth and SetCaretWidth



CharacterPointer

See GetCharacterPointer



CodePage

See GetCodePage and SetCodePage



ControlCharSymbol

See GetControlCharSymbol and SetControlCharSymbol



CurLine

See GetCurLine



CurLineRaw

See GetCurLineRaw



CurrentLine

See GetCurrentLine



CurrentPos

See GetCurrentPos and SetCurrentPos



DefaultStyle

See GetDefaultStyle and SetDefaultStyle



DocPointer

See GetDocPointer and SetDocPointer



EOLMode

See GetEOLMode and SetEOLMode



EdgeColour

See GetEdgeColour and SetEdgeColour



EdgeColumn

See GetEdgeColumn and SetEdgeColumn



EdgeMode

See GetEdgeMode and SetEdgeMode



EndAtLastLine

See GetEndAtLastLine and SetEndAtLastLine



EndStyled

See GetEndStyled



ExtraAscent

See GetExtraAscent and SetExtraAscent



ExtraDescent

See GetExtraDescent and SetExtraDescent



FirstVisibleLine

See GetFirstVisibleLine and SetFirstVisibleLine



GapPosition

See GetGapPosition



HighlightGuide

See GetHighlightGuide and SetHighlightGuide



Hint

See GetHint and SetHint



HotspotActiveBackground

See GetHotspotActiveBackground



HotspotActiveForeground

See GetHotspotActiveForeground



HotspotActiveUnderline

See GetHotspotActiveUnderline and SetHotspotActiveUnderline



HotspotSingleLine

See GetHotspotSingleLine and SetHotspotSingleLine



Identifier

See GetIdentifier and SetIdentifier



Indent

See GetIndent and SetIndent



IndentationGuides

See GetIndentationGuides and SetIndentationGuides



IndicatorCurrent

See GetIndicatorCurrent and SetIndicatorCurrent



IndicatorValue

See GetIndicatorValue and SetIndicatorValue



InsertionPoint

See GetInsertionPoint and SetInsertionPoint



KeysUnicode

See GetKeysUnicode and SetKeysUnicode



LastKeydownProcessed

See GetLastKeydownProcessed and SetLastKeydownProcessed



LastPosition

See GetLastPosition



LayoutCache

See GetLayoutCache and SetLayoutCache



Length

See GetLength



Lexer

See GetLexer and SetLexer



LineCount

See GetLineCount



MainSelection

See GetMainSelection and SetMainSelection



MarginLeft

See GetMarginLeft and SetMarginLeft



MarginOptions

See GetMarginOptions and SetMarginOptions



MarginRight

See GetMarginRight and SetMarginRight



Margins

See GetMargins



MaxLineState

See GetMaxLineState



ModEventMask

See GetModEventMask and SetModEventMask



Modify

See GetModify



MouseDownCaptures

See GetMouseDownCaptures and SetMouseDownCaptures



MouseDwellTime

See GetMouseDwellTime and SetMouseDwellTime



MultiPaste

See GetMultiPaste and SetMultiPaste



MultipleSelection

See GetMultipleSelection and SetMultipleSelection



NumberOfLines

See GetNumberOfLines



Overtype

See GetOvertype and SetOvertype



PasteConvertEndings

See GetPasteConvertEndings and SetPasteConvertEndings



PositionCacheSize

See GetPositionCacheSize and SetPositionCacheSize



PrintColourMode

See GetPrintColourMode and SetPrintColourMode



PrintMagnification

See GetPrintMagnification and SetPrintMagnification



PrintWrapMode

See GetPrintWrapMode and SetPrintWrapMode



PunctuationChars

See GetPunctuationChars and SetPunctuationChars



RangePointer

See GetRangePointer



ReadOnly

See GetReadOnly and SetReadOnly



RectangularSelectionAnchor

See GetRectangularSelectionAnchor and SetRectangularSelectionAnchor



RectangularSelectionAnchorVirtualSpace

See GetRectangularSelectionAnchorVirtualSpace and SetRectangularSelectionAnchorVirtualSpace



RectangularSelectionCaret

See GetRectangularSelectionCaret and SetRectangularSelectionCaret



RectangularSelectionCaretVirtualSpace

See GetRectangularSelectionCaretVirtualSpace and SetRectangularSelectionCaretVirtualSpace



RectangularSelectionModifier

See GetRectangularSelectionModifier and SetRectangularSelectionModifier



STCCursor

See GetSTCCursor and SetSTCCursor



STCFocus

See GetSTCFocus and SetSTCFocus



ScrollWidth

See GetScrollWidth and SetScrollWidth



ScrollWidthTracking

See GetScrollWidthTracking and SetScrollWidthTracking



SearchFlags

See GetSearchFlags and SetSearchFlags



SelAlpha

See GetSelAlpha and SetSelAlpha



SelEOLFilled

See GetSelEOLFilled and SetSelEOLFilled



SelectedText

See GetSelectedText



SelectedTextRaw

See GetSelectedTextRaw



SelectionEnd

See GetSelectionEnd and SetSelectionEnd



SelectionMode

See GetSelectionMode and SetSelectionMode



SelectionStart

See GetSelectionStart and SetSelectionStart



Selections

See GetSelections



Status

See GetStatus and SetStatus



StringSelection

See GetStringSelection



StyleBits

See GetStyleBits and SetStyleBits



StyleBitsNeeded

See GetStyleBitsNeeded



TabIndents

See GetTabIndents and SetTabIndents



TabWidth

See GetTabWidth and SetTabWidth



TargetEnd

See GetTargetEnd and SetTargetEnd



TargetStart

See GetTargetStart and SetTargetStart



Technology

See GetTechnology and SetTechnology



Text

See GetText and SetText



TextLength

See GetTextLength



TextRaw

See GetTextRaw and SetTextRaw



TwoPhaseDraw

See GetTwoPhaseDraw and SetTwoPhaseDraw



UndoCollection

See GetUndoCollection and SetUndoCollection



UseHorizontalScrollBar

See GetUseHorizontalScrollBar and SetUseHorizontalScrollBar



UseTabs

See GetUseTabs and SetUseTabs



UseVerticalScrollBar

See GetUseVerticalScrollBar and SetUseVerticalScrollBar



Value

See GetValue and SetValue



ViewEOL

See GetViewEOL and SetViewEOL



ViewWhiteSpace

See GetViewWhiteSpace and SetViewWhiteSpace



VirtualSpaceOptions

See GetVirtualSpaceOptions and SetVirtualSpaceOptions



WhitespaceChars

See GetWhitespaceChars and SetWhitespaceChars



WhitespaceSize

See GetWhitespaceSize and SetWhitespaceSize



WordChars

See GetWordChars and SetWordChars



WrapIndentMode

See GetWrapIndentMode and SetWrapIndentMode



WrapMode

See GetWrapMode and SetWrapMode



WrapStartIndent

See GetWrapStartIndent and SetWrapStartIndent



WrapVisualFlags

See GetWrapVisualFlags and SetWrapVisualFlags



WrapVisualFlagsLocation

See GetWrapVisualFlagsLocation and SetWrapVisualFlagsLocation



XOffset

See GetXOffset and SetXOffset



Zoom

See GetZoom and SetZoom