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/).
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
See also
Ctor. |
|
Extend life of document. |
|
Add a selection. |
|
Add array of cells to document. |
|
Add text to the document at current position. |
|
Add text to the document at current position. |
|
Add a container action to the undo stack. |
|
Enlarge the document to a particular size of text bytes. |
|
Clear the annotations from all lines. |
|
Clear annotations from the given line. |
|
Get the number of annotation lines for a line. |
|
Get the style number for the annotations for a line. |
|
Get the start of the range of style numbers used for annotations. |
|
Get the annotation styles for a line. |
|
Get the annotation text for a line. |
|
Get the visibility for the annotations for a view. |
|
Set the style number for the annotations for a line. |
|
Get the start of the range of style numbers used for annotations. |
|
Set the annotation styles for a line. |
|
Set the annotation text for a line. |
|
Set the visibility for the annotations for a view. |
|
Append a string to the end of the document without changing the selection. |
|
Append a string to the end of the document without changing the selection. |
|
Is there an auto-completion list visible? |
|
Remove the auto-completion list from the screen. |
|
User has selected an item so remove the list and insert the selection. |
|
Retrieve whether or not autocompletion is hidden automatically when nothing matches. |
|
Retrieve whether auto-completion cancelled by backspacing before start. |
|
Get auto-completion case insensitive behaviour. |
|
Retrieve whether a single item auto-completion list automatically choose the item. |
|
Get currently selected item position in the auto-completion list. |
|
Retrieve whether or not autocompletion deletes any word characters after the inserted text upon completion. |
|
Retrieve state of ignore case flag. |
|
Set the maximum height, in rows, of auto-completion and user lists. |
|
Get the maximum width, in characters, of auto-completion and user lists. |
|
Retrieve the auto-completion list separator character. |
|
Retrieve the auto-completion list type-separator character. |
|
Retrieve the position of the caret when the auto-completion list was displayed. |
|
Select the item in the auto-completion list that starts with a string. |
|
Set whether or not autocompletion is hidden automatically when nothing matches. |
|
Should the auto-completion list be cancelled if the user backspaces to a position before where the box was created. |
|
Set auto-completion case insensitive behaviour to either prefer case-sensitive matches or have no preference. |
|
Should a single item auto-completion list automatically choose the item. |
|
Set whether or not autocompletion deletes any word characters after the inserted text upon completion. |
|
Define a set of characters that when typed will cause the autocompletion to choose the selected item. |
|
Set whether case is significant when performing auto-completion searches. |
|
Set the maximum height, in rows, of auto-completion and user lists. |
|
Set the maximum width, in characters, of auto-completion and user lists. |
|
Change the separator character in the string setting up an auto-completion list. |
|
Change the type-separator character in the string setting up an auto-completion list. |
|
Display a auto-completion list. |
|
Define a set of character that when typed cancel the auto-completion list. |
|
Call this function to enable auto-completion of the text typed in a single-line text control using the given choices. |
|
Call this function to enable auto-completion of the text using the file system directories. |
|
Call this function to enable auto-completion of the text typed in a single-line text control using all valid file system paths. |
|
Dedent the selected lines. |
|
Start a sequence of actions that is undone and redone as a unit. |
|
Highlight the character at a position indicating there is no matching brace. |
|
Use specified indicator to highlight non matching brace instead of changing its style. |
|
Highlight the characters at two positions. |
|
Use specified indicator to highlight matching braces instead of changing their style. |
|
Find the position of a matching brace or |
|
Is there an active call tip? |
|
Remove the call tip from the screen. |
|
Retrieve the position where the caret was before displaying the call tip. |
|
Set the background colour for the call tip. |
|
Set the foreground colour for the call tip. |
|
Set the foreground colour for the highlighted part of the call tip. |
|
Highlight a segment of the definition. |
|
Set position of calltip, above or below text. |
|
Show a call tip containing a definition near position pos. |
|
Enable use of |
|
Returns |
|
Returns |
|
Will a paste succeed? |
|
Are there any redoable actions in the undo history? |
|
Are there any undoable actions in the undo history? |
|
Cancel any modes such as call tip or auto-completion list display. |
|
Indicate that the internal state of a lexer has changed over a range and therefore there may be a need to redraw. |
|
Sets the new text control value. |
|
Move caret left one character. |
|
Move caret left one character extending selection to new caret position. |
|
Move caret left one character, extending rectangular selection to new caret position. |
|
Find the position of a character from a point within the window. |
|
Find the position of a character from a point within the window. |
|
Move caret right one character. |
|
Move caret right one character extending selection to new caret position. |
|
Move caret right one character, extending rectangular selection to new caret position. |
|
Set the last x chosen value to be the caret x position. |
|
Clear the selection. |
|
Delete all text in the document. |
|
Set all style bytes to 0, remove all folding information. |
|
Clear all the registered images. |
|
Clear selections to a single empty stream selection. |
|
When key+modifier combination km is pressed perform msg. |
|
When key+modifier combination km is pressed do nothing. |
|
Drop all key mappings. |
|
Perform one of the operations defined by the |
|
Colourise a segment of the document using the current lexing language. |
|
Find the next line at or after lineStart that is a contracted fold header line. |
|
Convert all line endings in the document to one mode. |
|
Copy the selection to the clipboard. |
|
Copy the selection, if selection empty copy the line with the caret. |
|
Copy a range of text to the clipboard. |
|
Copy argument text to the clipboard. |
|
Count characters between two positions. |
|
Create the UI elements for a |
|
Create a new document object. |
|
Create an ILoader. |
|
Cut the selection to the clipboard. |
|
Delete back from the current position to the start of the line. |
|
Delete forwards from the current position to the end of the line. |
|
Delete the word to the left of the caret. |
|
Delete the word to the right of the caret. |
|
Delete the word to the right of the caret, but not the trailing non-word characters. |
|
Delete the selection or if no selection, the character before the caret. |
|
Delete the selection or if no selection, the character before the caret. |
|
Delete a range of text in the document. |
|
Retrieve a ‘ |
|
Describe a property. |
|
Allow for simulating a DnD DragOver. |
|
Allow for simulating a DnD DropText. |
|
Find the document line of a display line taking hidden lines into account. |
|
Move caret to last position in document. |
|
Move caret to last position in document extending selection to new caret position. |
|
Move caret to first position in document. |
|
Move caret to first position in document extending selection to new caret position. |
|
Switch from insert to overtype mode or the reverse. |
|
Delete the undo history. |
|
End a sequence of actions that is undone and redone as a unit. |
|
Ensure the caret is visible. |
|
Ensure a particular line is visible by expanding any header line hiding it. |
|
Ensure a particular line is visible by expanding any header line hiding it. |
|
Find the position of a column on a line taking into account tabs and multi-byte characters. |
|
Find some text in the document. |
|
Insert a Form Feed character. |
|
On Windows, will draw the document into a display context such as a printer. |
|
Get the foreground colour of additional carets. |
|
Whether additional carets will blink. |
|
Whether additional carets are visible. |
|
Get the alpha of the selection. |
|
Whether typing can be performed into multiple selections. |
|
Are all lines visible? |
|
Returns the position of the opposite end of the selection to the caret. |
|
Does a backspace pressed when caret is within indentation unindent? |
|
Is drawing done first into a buffer or direct to the screen? |
|
Get the foreground colour of the caret. |
|
Get the background alpha of the caret line. |
|
Get the colour of the background of the line containing the caret. |
|
Is the background of the line containing the caret in a different colour? |
|
Get the time in milliseconds that the caret is on and off. |
|
Can the caret preferred x position only be changed by explicit movement commands? |
|
Returns the current style of the caret. |
|
Returns the width of the insert mode caret. |
|
Returns the character byte at the position. |
|
Compact the document buffer and return a read-only memoryview |
|
Get the code page used to interpret the bytes of the document as characters. |
|
Retrieve the column number of a position, taking tab width into account. |
|
Get the way control characters are displayed. |
|
Retrieve the text of the line containing the caret. |
|
Retrieve the text of the line containing the caret. |
|
Returns the line number of the line with the caret. |
|
Returns the position of the caret. |
|
Returns the style currently used for the new text. |
|
Retrieve a pointer to the document object. |
|
Retrieve the current end of line mode - one of |
|
Retrieve the colour used in edge indication. |
|
Retrieve the column number which text should be kept within. |
|
Retrieve the edge highlight mode. |
|
Retrieve whether the maximum scroll position has the last line at the bottom of the view. |
|
Retrieve the position of the last correctly styled character. |
|
Get extra ascent for each line. |
|
Get extra descent for each line. |
|
Retrieve the display line at the top of the display. |
|
Is a header line expanded? |
|
Retrieve the fold level of a line. |
|
Find the parent line of a child line. |
|
Return a position which, to avoid performance costs, should not be within the range of a call to GetRangePointer. |
|
Get the highlighted indentation guide column. |
|
Returns the current hint string. |
|
Get the back colour for active hotspots. |
|
Get the fore colour for active hotspots. |
|
Get whether underlining for active hotspots. |
|
Get the HotspotSingleLine property. |
|
Get the identifier. |
|
Retrieve indentation size. |
|
Are the indentation guides visible? |
|
Get the current indicator. |
|
Get the current indicator value. |
|
Returns the insertion point, or cursor, position. |
|
Are keys always interpreted as Unicode? |
|
Find the last child line of a header line. |
|
Can be used to prevent the |
|
Returns the zero based index of the last position in the text control, which is equal to the number of characters in the control. |
|
Retrieve the degree of caching of layout information. |
|
Returns the number of bytes in the document. |
|
Retrieve the lexing language of the document. |
|
Retrieve the contents of a line. |
|
Returns the number of lines in the document. |
|
Get the position after the last visible characters on a line. |
|
Retrieve the position before the first non indentation character on a line. |
|
Retrieve the number of columns that a line is indented. |
|
Retrieve the contents of a line. |
|
Retrieve the position of the end of the selection at the given line ( |
|
Retrieve the position of the start of the selection at the given line ( |
|
Retrieve the extra styling information for a line. |
|
Is a line visible? |
|
Which selection is the main selection. |
|
Retrieve the cursor shown in a margin. |
|
Returns the size in pixels of the left margin. |
|
Retrieve the marker mask of a margin. |
|
Get the margin options. |
|
Returns the size in pixels of the right margin. |
|
Retrieve the mouse click sensitivity of a margin. |
|
Retrieve the type of a margin. |
|
Retrieve the width of a margin in pixels. |
|
Returns the margins used by the control. |
|
Which symbol was defined for markerNumber with MarkerDefine. |
|
Retrieve the last line number that has line state. |
|
Get which document modification events are sent to the container. |
|
Is the document different from when it was last saved? |
|
Get whether mouse gets captured. |
|
Retrieve the time the mouse must sit still to generate a mouse dwell event. |
|
Retrieve the effect of pasting when there are multiple selections. |
|
Whether multiple selections can be made. |
|
Returns |
|
Get convert-on-paste setting. |
|
How many entries are allocated to the position cache? |
|
Returns the print colour mode. |
|
Returns the print magnification. |
|
Is printing line wrapped? |
|
Retrieve a ‘property’ value previously set with SetProperty. |
|
Retrieve a ‘property’ value previously set with SetProperty, with ‘$()’ variable replacement on returned buffer. |
|
Retrieve a ‘property’ value previously set with SetProperty, interpreted as an int |
|
Get the set of characters making up punctuation characters. |
|
Returns the string containing the text starting in the positions from and up to to in the control. |
|
Return a read-only pointer to a range of characters in the |
|
In read-only mode? |
|
Get the modifier key used for rectangular selection. |
|
Get cursor type. |
|
Get internal focus flag. |
|
Retrieve the document width assumed for scrolling. |
|
Retrieve whether the scroll width tracks wide lines. |
|
Get the search flags used by SearchInTarget. |
|
Get the alpha of the selection. |
|
Is the selection end of line filled? |
|
Retrieve the selected text. |
|
Retrieve the selected text. |
|
Gets the current selection span. |
|
Returns the position at the end of the selection. |
|
Get the mode of the current selection. |
|
Returns the position at the end of the selection. |
|
Returns the position at the start of the selection. |
|
Returns the position at the start of the selection. |
|
How many selections are there? |
|
Get error status. |
|
Gets the text currently selected in the control. |
|
Returns the style byte at the position. |
|
Retrieve number of bits in style bytes used to hold the lexical state. |
|
Retrieve the number of bits the current lexer needs for styling. |
|
Retrieve a buffer of cells. |
|
Does a tab pressed when caret is within indentation indent? |
|
Retrieve the visible size of a tab. |
|
Retrieve the value of a tag from a regular expression search. |
|
Get the position that ends the target. |
|
Get the position that starts the target. |
|
Get the tech. |
|
Retrieve all the text in the document. |
|
Retrieve the number of characters in the document. |
|
Retrieve a range of text. |
|
Retrieve a range of text. |
|
Retrieve all the text in the document. |
|
Is drawing done in two phases with backgrounds drawn before foregrounds? |
|
Is undo history being collected? |
|
Is the horizontal scroll bar visible? |
|
Retrieve whether tabs will be used in indentation. |
|
Is the vertical scroll bar visible? |
|
Gets the contents of the control. |
|
Are the end of line characters visible? |
|
Are white space characters currently visible? Returns one of |
|
Get the set of characters making up whitespace for when moving or selecting by word. |
|
Get the size of the dots used to mark space characters. |
|
Get the set of characters making up words for when moving or selecting by word. |
|
Retrieve how wrapped sublines are placed. |
|
Retrieve whether text is word wrapped. |
|
Retrieve the start indent for wrapped lines. |
|
Retrieve the display mode of visual flags for wrapped lines. |
|
Retrieve the location of visual flags for wrapped lines. |
|
Retrieve the zoom level. |
|
Set caret to start of a line and ensure it is visible. |
|
Set caret to a position and ensure it is visible. |
|
Make a range of lines invisible. |
|
Draw the selection in normal style or with selection highlighted. |
|
Move caret to first position on line. |
|
Move caret to first position on display line. |
|
Move caret to first position on display line extending selection to new caret position. |
|
Move caret to first position on line extending selection to new caret position. |
|
Move caret to first position on line, extending rectangular selection to new caret position. |
|
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)?. |
|
Are any indicators present at position? |
|
Turn a indicator off over a range. |
|
Where does a particular indicator end? |
|
Turn a indicator on over a range. |
|
Get the alpha fill colour of the given indicator. |
|
Retrieve the foreground colour of an indicator. |
|
Get the alpha outline colour of the given indicator. |
|
Retrieve the style of an indicator. |
|
Retrieve whether indicator drawn under or over text. |
|
Set the alpha fill colour of the given indicator. |
|
Set the foreground colour of an indicator. |
|
Set the alpha outline colour of the given indicator. |
|
Set an indicator to plain, squiggle or |
|
Set an indicator to draw under text or over(default). |
|
Where does a particular indicator start? |
|
What value does a particular indicator have at at a position? |
|
Insert string at a position. |
|
Insert string at a position. |
|
Returns |
|
Returns |
|
Copy the line containing the caret. |
|
Cut the line containing the caret. |
|
Delete the line containing the caret. |
|
Move caret down one line. |
|
Move caret down one line extending selection to new caret position. |
|
Move caret down one line, extending rectangular selection to new caret position. |
|
Duplicate the current line. |
|
Move caret to last position on line. |
|
Move caret to last position on display line. |
|
Move caret to last position on display line extending selection to new caret position. |
|
Move caret to last position on line extending selection to new caret position. |
|
Move caret to last position on line, extending rectangular selection to new caret position. |
|
Retrieve the line containing a position. |
|
How many characters are on a line, including end of line characters? |
|
Scroll horizontally and vertically. |
|
Scroll the document down, keeping the caret visible. |
|
Scroll the document up, keeping the caret visible. |
|
Switch the current line with the previous. |
|
Move caret up one line. |
|
Move caret up one line extending selection to new caret position. |
|
Move caret up one line, extending rectangular selection to new caret position. |
|
Join the lines in the target. |
|
Retrieves the number of lines completely visible. |
|
Split the lines in the target into lines that are less wide than pixelWidth where possible. |
|
Load the contents of filename into the editor. |
|
Transform the selection to lower case. |
|
Get the style number for the text margin for a line. |
|
Get the start of the range of style numbers used for margin text. |
|
Get the styles in the text margin for a line. |
|
Get the text in the text margin for a line. |
|
Set the style number for the text margin for a line. |
|
Get the start of the range of style numbers used for margin text. |
|
Set the style in the text margin for a line. |
|
Set the text in the text margin for a line. |
|
Clear the margin text on all lines. |
|
Add a marker to a line, returning an |
|
Add a set of markers to a line. |
|
Set the symbol used for a particular marker number, and optionally the fore and background colours. |
|
Define a marker from a bitmap. |
|
Define a marker from |
|
Delete a marker from a line. |
|
Delete all markers with a particular number from all lines. |
|
Delete a marker. |
|
Enable/disable highlight for current folding bloc (smallest one that contains the caret) |
|
Get a bit mask of all the markers set on a line. |
|
Retrieve the line number at which a particular marker is located. |
|
Find the next line at or after lineStart that includes a marker in mask. |
|
Find the previous line before lineStart that includes a marker in mask. |
|
Set the alpha used for a marker that is drawn in the text area, not the margin. |
|
Set the background colour used for a particular marker number. |
|
Set the background colour used for a particular marker number when its folding block is selected. |
|
Set the foreground colour used for a particular marker number. |
|
Move the caret inside current view if it’s not there already. |
|
Move the selected lines down one line, shifting the line below before the selection. |
|
Move the selected lines up one line, shifting the line above after the selection. |
|
Insert a new line, may use a |
|
Move caret one page down. |
|
Move caret one page down extending selection to new caret position. |
|
Move caret one page down, extending rectangular selection to new caret position. |
|
Move caret one page up. |
|
Move caret one page up extending selection to new caret position. |
|
Move caret one page up, extending rectangular selection to new caret position. |
|
Move caret between paragraphs (delimited by empty lines). |
|
Paste the contents of the clipboard into the document replacing the selection. |
|
Retrieve the point in the window where a position is displayed. |
|
Given a valid document position, return the next position taking code page into account. |
|
Given a valid document position, return the previous position taking code page into account. |
|
Retrieve the position at the start of a line. |
|
Find the position from a point within the window. |
|
Find the position from a point within the window but return |
|
Converts given text position to client coordinates in pixels. |
|
For private communication between an application and a known lexer. |
|
Retrieve a ‘ |
|
Retrieve the type of a property. |
|
Set the height for future |
|
Set the width for future |
|
Redoes the next action on the undo history. |
|
Register an image for use in autocompletion lists. |
|
Register an |
|
Release a reference to the document, deleting document if it fades to black. |
|
Removes the text starting at the first given position up to (but not including) the character at the last position. |
|
Replaces the text starting at the first position up to (but not including) the character at the last position with the given text. |
|
Replace the selected text with the argument text. |
|
Replace the target text with the argument text. |
|
Replace the target text with the argument text after \d processing. |
|
Set the main selection to the next selection. |
|
Write the contents of the editor to filename. |
|
Scroll enough to make the given column visible. |
|
Scroll to end of document. |
|
Scroll enough to make the given line visible. |
|
Scroll to start of document. |
|
Sets the current caret position to be the search anchor. |
|
Search for a counted string in the target and set the target to the found range. |
|
Find some text starting at the search anchor. |
|
Find some text starting at the search anchor and moving backwards. |
|
Select all the text in the document. |
|
Deselects selected text in the control. |
|
Duplicate the selection. |
|
Is the selection rectangular? The alternative is the more common stream selection. |
|
Send a message to Scintilla. |
|
Set the foreground colour of additional carets. |
|
Set whether additional carets will blink. |
|
Set whether additional carets are visible. |
|
Set the alpha of the selection. |
|
Set the background colour of additional selections. |
|
Set the foreground colour of additional selections. |
|
Set whether typing can be performed into multiple selections. |
|
Set the selection anchor to a position. |
|
Sets whether a backspace pressed when caret is within indentation unindents. |
|
If drawing is buffered then each line of text is drawn into a bitmap buffer before drawing it to the screen to avoid flicker. |
|
Set the foreground colour of the caret. |
|
Set background alpha of the caret line. |
|
Set the colour of the background of the line containing the caret. |
|
Display the background of the line containing the caret in a different colour. |
|
Get the time in milliseconds that the caret is on and off. |
|
Stop the caret preferred x position changing when the user types. |
|
Set the style of the caret to be drawn. |
|
Set the width of the insert mode caret. |
|
Reset the set of characters for whitespace and word characters to the defaults. |
|
Set the code page used to interpret the bytes of the document as characters. |
|
Change the way control characters are displayed: If symbol is < 32, keep the drawn way, else, use the given character. |
|
Sets the position of the caret. |
|
Change the document object used. |
|
Set the current end of line mode. |
|
Change the colour used in edge indication. |
|
Set the column number of the edge. |
|
The edge may be displayed by a line ( |
|
Makes the text item editable or read-only, overriding the |
|
Set caret to a position, while removing any existing selection. |
|
Sets the scroll range so that maximum scroll position has the last line at the bottom of the view (default). |
|
Set extra ascent for each line. |
|
Set extra descent for each line. |
|
Scroll so that a display line is at the top of the display. |
|
Show the children of a header line. |
|
Set some style options for folding. |
|
Set the fold level of a line. |
|
Set the colours used as a chequerboard pattern in the fold margin. |
|
Set the horizontal scrollbar to use instead of the ont that’s built-in. |
|
Set the highlighted indentation guide column. |
|
Sets a hint shown in an empty unfocused text control. |
|
Set a back colour for active hotspots. |
|
Set a fore colour for active hotspots. |
|
Enable / Disable underlining active hotspots. |
|
Limit hotspots to single line so hotspots on two lines don’t merge. |
|
Set the identifier reported as idFrom in notification messages. |
|
Set the number of spaces used for one level of indentation. |
|
Show or hide indentation guides. |
|
Set the indicator used for IndicatorFillRange and IndicatorClearRange. |
|
Set the value used for IndicatorFillRange. |
|
Sets the insertion point at the given position. |
|
Sets the insertion point at the end of the text control. |
|
Set up the key words used by the lexer. |
|
Always interpret keyboard input as Unicode. |
|
Sets the degree of caching of layout information. |
|
Set the lexing language of the document. |
|
Set the lexing language of the document based on string name. |
|
Change the indentation of a line to a number of columns. |
|
Used to hold extra styling information for each line. |
|
Set the main selection. |
|
Set the cursor shown when the mouse is inside a margin. |
|
Sets the size in pixels of the left margin. |
|
Set a mask that determines which markers are displayed in a margin. |
|
Set the margin options. |
|
Sets the size in pixels of the right margin. |
|
Make a margin sensitive or insensitive to mouse clicks. |
|
Set a margin to be either numeric or symbolic. |
|
Set the width of a margin to a width expressed in pixels. |
|
Set the left and right margin in the edit area, measured in pixels. |
|
This function sets the maximum number of characters the user can enter into the control. |
|
Set which document modification events are sent to the container. |
|
Marks the control as being modified by the user or not. |
|
Set whether the mouse is captured when its button is pressed. |
|
Sets the time the mouse must sit still to generate a mouse dwell event. |
|
Change the effect of pasting when there are multiple selections. |
|
Set whether multiple selections can be made. |
|
Set to overtype ( |
|
Enable/Disable convert-on-paste for line endings. |
|
Set number of entries in position cache. |
|
Modify colours when printing for clearer printed text. |
|
Sets the print magnification added to the point size of each style for printing. |
|
Set printing to line wrapped ( |
|
Set up a value that may be used by a lexer for some optional feature. |
|
Set the set of characters making up punctuation characters Should be called after SetWordChars. |
|
Set to read only or read write. |
|
On GTK+, allow selecting the modifier key to use for mouse-based rectangular selection. |
|
Sets the cursor to one of the |
|
Change internal focus flag. |
|
Remember the current position in the undo history as the position at which the document was saved. |
|
Sets the document width assumed for scrolling. |
|
Sets whether the maximum width line displayed is used to set scroll width. |
|
Set the search flags used by SearchInTarget. |
|
Set the alpha of the selection. |
|
Set the background colour of the main and additional selections and whether to use this setting. |
|
Set the selection to have its end of line filled or not. |
|
Set the foreground colour of the main and additional selections and whether to use this setting. |
|
Selects the text starting at the first position up to (but not including) the character at the last position. |
|
Sets the position that ends the selection - this becomes the currentPosition. |
|
Set the selection mode to stream ( |
|
Sets the position that ends the selection - this becomes the currentPosition. |
|
Sets the position that starts the selection - this becomes the anchor. |
|
Sets the position that starts the selection - this becomes the anchor. |
|
Change error status - 0 = |
|
Divide each styling byte into lexical class bits (default: 5) and indicator bits (default: 3). |
|
Set the styles for a segment of the document. |
|
Change style from current styling position for length characters to a style and move the current styling position to after this newly styled segment. |
|
Sets whether a tab pressed when caret is within indentation indents. |
|
Change the visible size of a tab to be a multiple of the width of a space character. |
|
Sets the position that ends the target which is used for updating the document without affecting the scroll position. |
|
Sets the position that starts the target which is used for updating the document without affecting the scroll position. |
|
Set the technology used. |
|
Replace the contents of the document with the argument text. |
|
Replace the contents of the document with the argument text. |
|
In twoPhaseDraw mode, drawing is performed in two phases, first the background and then the foreground. |
|
Choose between collecting actions into the undo history and discarding them. |
|
Show or hide the horizontal scroll bar. |
|
Indentation will only use space characters if useTabs is |
|
Show or hide the vertical scroll bar. |
|
Set the vertical scrollbar to use instead of the ont that’s built-in. |
|
Sets the new text control value. |
|
Make the end of line characters visible or invisible. |
|
Make white space characters invisible, always visible or visible outside indentation. |
|
Set the way the display area is determined when a particular line is to be moved to by Find, FindNext, GotoLine, etc. |
|
Set the background colour of all whitespace and whether to use this setting. |
|
Set the set of characters making up whitespace for when moving or selecting by word. |
|
Set the foreground colour of all whitespace and whether to use this setting. |
|
Set the size of the dots used to mark space characters. |
|
Set the set of characters making up words for when moving or selecting by word. |
|
Sets how wrapped sublines are placed. |
|
Sets whether text is word wrapped. |
|
Set the start indent for wrapped lines. |
|
Set the display mode of visual flags for wrapped lines. |
|
Set the location of visual flags for wrapped lines. |
|
Set the way the caret is kept visible when going sideways. |
|
Get and Set the xOffset (ie, horizontal scroll position). |
|
Set the way the line the caret is on is kept visible. |
|
Set the zoom level. |
|
Make a range of lines visible. |
|
Start notifying the container of all key presses and commands. |
|
Set the current styling position to pos and the styling mask to mask. |
|
Stop notifying the container of all key presses and commands. |
|
Move caret to bottom of page, or one page down if already at bottom of page. |
|
Move caret to bottom of page, or one page down if already at bottom of page, extending selection to new caret position. |
|
Move caret to top of page, or one page up if already at top of page. |
|
Move caret to top of page, or one page up if already at top of page, extending selection to new caret position. |
|
Clear all the styles and make equivalent to the global default style. |
|
Get the background colour of a style. |
|
Get is a style bold or not. |
|
Get is a style mixed case, or to force upper or lower case. |
|
Get is a style changeable or not (read only). |
|
Get the character set of the font in a style. |
|
Get is a style to have its end of line filled or not. |
|
Get the font facename of a style. |
|
Get the font of a style. |
|
Get the foreground colour of a style. |
|
Get is a style a hotspot or not. |
|
Get is a style italic or not. |
|
Get the size of characters of a style. |
|
Get the size of characters of a style in points multiplied by 100. |
|
Get is a style underlined or not. |
|
Get is a style visible or not. |
|
Get the weight of characters of a style. |
|
Reset the default style to its state at startup. |
|
Set the background colour of a style. |
|
Set a style to be bold or not. |
|
Set a style to be mixed case, or to force upper or lower case. |
|
Set a style to be changeable or not (read only). |
|
Set the character set of the font in a style. |
|
Set a style to have its end of line filled or not. |
|
Set the font of a style. |
|
Set style size, face, bold, italic, and underline attributes from a wx.Font’s attributes. |
|
Set all font style attributes at once. |
|
Set the font encoding to be used by a style. |
|
Set the foreground colour of a style. |
|
Set a style to be a hotspot or not. |
|
Set a style to be italic or not. |
|
Set the size of characters of a style. |
|
Set the size of characters of a style. |
|
Extract style settings from a spec-string which is composed of one or more of the following comma separated elements |
|
Set a style to be underlined or not. |
|
Set a style to be visible or not. |
|
Set the weight of characters of a style. |
|
Swap that caret and anchor of the main selection. |
|
If selection is empty or all on one line replace the selection with a tab character. |
|
Make the target range start and end be the same as the selection range start and end. |
|
Retrieve the height of a particular line of text in pixels. |
|
Measure the pixel width of some text in a particular style. |
|
Switch between sticky and non-sticky: meant to be bound to a key. |
|
Switch a header line between expanded and contracted. |
|
Undo one action in the undo history. |
|
Transform the selection to upper case. |
|
Set whether a pop up menu is displayed automatically when the user presses the wrong mouse button. |
|
Display a list of strings and send notification when user chooses one. |
|
Move caret to before first visible character on line. |
|
Like VCHome but extending selection to new caret position. |
|
Move caret to before first visible character on line. |
|
Centre current line in window. |
|
Find the display line of a document line taking hidden lines into account. |
|
Get position of end of word. |
|
Move caret left one word. |
|
Move caret left one word, position cursor at end of word. |
|
Move caret left one word, position cursor at end of word, extending selection to new caret position. |
|
Move caret left one word extending selection to new caret position. |
|
Move to the previous change in capitalisation. |
|
Move to the previous change in capitalisation extending selection to new caret position. |
|
Move to the change next in capitalisation. |
|
Move to the next change in capitalisation extending selection to new caret position. |
|
Move caret right one word. |
|
Move caret right one word, position cursor at end of word. |
|
Move caret right one word, position cursor at end of word, extending selection to new caret position. |
|
Move caret right one word extending selection to new caret position. |
|
Get position of start of word. |
|
The number of display lines needed to wrap a document line. |
|
Writes the text into the text control at the current insertion position. |
|
Magnify the displayed text by increasing the sizes by 1 point. |
|
Make the displayed text smaller by decreasing the sizes by 1 point. |
|
|
|
Append text to the textctrl, for file-like compatibility. |
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.
__init__ (self, parent, id=ID_ANY, pos=DefaultPosition, size=DefaultSize, style=0, name=STCNameStr)
Ctor.
__init__ (self)
Default constructor.
Extend life of document.
docPointer –
Add a selection.
caret (int) –
anchor (int) –
int
Add array of cells to document.
data (MemoryBuffer) –
Add text to the document at current position.
text (string) –
Add text to the document at current position.
text (int) –
length (int) –
Add a container action to the undo stack.
token (int) –
flags (int) –
Enlarge the document to a particular size of text bytes.
bytes (int) –
Clear the annotations from all lines.
Clear annotations from the given line.
line (int) –
Get the number of annotation lines for a line.
line (int) –
int
Get the style number for the annotations for a line.
line (int) –
int
Get the start of the range of style numbers used for annotations.
int
Get the annotation styles for a line.
line (int) –
string
Get the annotation text for a line.
line (int) –
string
Get the visibility for the annotations for a view.
int
Set the style number for the annotations for a line.
line (int) –
style (int) –
Get the start of the range of style numbers used for annotations.
style (int) –
Set the annotation styles for a line.
line (int) –
styles (string) –
Set the annotation text for a line.
line (int) –
text (string) –
Set the visibility for the annotations for a view.
visible (int) –
Append a string to the end of the document without changing the selection.
text (string) –
Append a string to the end of the document without changing the selection.
text (int) –
length (int) –
Is there an auto-completion list visible?
bool
Remove the auto-completion list from the screen.
User has selected an item so remove the list and insert the selection.
Retrieve whether or not autocompletion is hidden automatically when nothing matches.
bool
Retrieve whether auto-completion cancelled by backspacing before start.
bool
Get auto-completion case insensitive behaviour.
int
Retrieve whether a single item auto-completion list automatically choose the item.
bool
Get currently selected item position in the auto-completion list.
int
Retrieve whether or not autocompletion deletes any word characters after the inserted text upon completion.
bool
Retrieve state of ignore case flag.
bool
Set the maximum height, in rows, of auto-completion and user lists.
int
Get the maximum width, in characters, of auto-completion and user lists.
int
Retrieve the auto-completion list separator character.
int
Retrieve the auto-completion list type-separator character.
int
Retrieve the position of the caret when the auto-completion list was displayed.
int
Select the item in the auto-completion list that starts with a string.
text (string) –
Set whether or not autocompletion is hidden automatically when nothing matches.
autoHide (bool) –
Should the auto-completion list be cancelled if the user backspaces to a position before where the box was created.
cancel (bool) –
Set auto-completion case insensitive behaviour to either prefer case-sensitive matches or have no preference.
behaviour (int) –
Should a single item auto-completion list automatically choose the item.
chooseSingle (bool) –
Set whether or not autocompletion deletes any word characters after the inserted text upon completion.
dropRestOfWord (bool) –
Define a set of characters that when typed will cause the autocompletion to choose the selected item.
characterSet (string) –
Set whether case is significant when performing auto-completion searches.
ignoreCase (bool) –
Set the maximum height, in rows, of auto-completion and user lists.
The default is 5 rows.
rowCount (int) –
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.
characterCount (int) –
Change the separator character in the string setting up an auto-completion list.
Default is space but can be changed if items contain space.
separatorCharacter (int) –
Change the type-separator character in the string setting up an auto-completion list.
Default is ‘?’ but can be changed if items contain ‘?’.
separatorCharacter (int) –
Display a auto-completion list.
The lenEntered parameter indicates how many characters before the caret should be used to provide context.
lenEntered (int) –
itemList (string) –
Define a set of character that when typed cancel the auto-completion list.
characterSet (string) –
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.
choices (list of strings) –
bool
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 (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 returning the completions dynamically, depending on the text already entered by user and so is more efficient.
The specified completer object will be used to retrieve the list of possible completions for the already entered text and will be deleted by 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).
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
).
bool
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.
See also
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.
bool
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
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.
bool
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
Dedent the selected lines.
Start a sequence of actions that is undone and redone as a unit.
May be nested.
Highlight the character at a position indicating there is no matching brace.
pos (int) –
Use specified indicator to highlight non matching brace instead of changing its style.
useBraceBadLightIndicator (bool) –
indicator (int) –
Highlight the characters at two positions.
pos1 (int) –
pos2 (int) –
Use specified indicator to highlight matching braces instead of changing their style.
useBraceHighlightIndicator (bool) –
indicator (int) –
Find the position of a matching brace or INVALID_POSITION
if no match.
pos (int) –
int
Is there an active call tip?
bool
Remove the call tip from the screen.
Retrieve the position where the caret was before displaying the call tip.
int
Set the background colour for the call tip.
back (wx.Colour) –
Set the foreground colour for the call tip.
fore (wx.Colour) –
Set the foreground colour for the highlighted part of the call tip.
fore (wx.Colour) –
Highlight a segment of the definition.
start (int) –
end (int) –
Set position of calltip, above or below text.
above (bool) –
Show a call tip containing a definition near position pos.
pos (int) –
definition (string) –
Enable use of STYLE_CALLTIP
and set call tip tab size in pixels.
tabSize (int) –
Returns True
if the selection can be copied to the clipboard.
bool
Returns True
if the selection can be cut to the clipboard.
bool
Will a paste succeed?
bool
Are there any redoable actions in the undo history?
bool
Are there any undoable actions in the undo history?
bool
Cancel any modes such as call tip or auto-completion list display.
Indicate that the internal state of a lexer has changed over a range and therefore there may be a need to redraw.
start (int) –
end (int) –
int
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.
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.
Move caret left one character.
Move caret left one character extending selection to new caret position.
Move caret left one character, extending rectangular selection to new caret position.
Find the position of a character from a point within the window.
x (int) –
y (int) –
int
Find the position of a character from a point within the window.
Return INVALID_POSITION
if not close to text.
x (int) –
y (int) –
int
Move caret right one character.
Move caret right one character extending selection to new caret position.
Move caret right one character, extending rectangular selection to new caret position.
Set the last x chosen value to be the caret x position.
Clear the selection.
Delete all text in the document.
Set all style bytes to 0, remove all folding information.
Clear all the registered images.
Clear selections to a single empty stream selection.
When key+modifier combination km is pressed perform msg.
key (int) –
modifiers (int) –
cmd (int) –
When key+modifier combination km is pressed do nothing.
key (int) –
modifiers (int) –
Drop all key mappings.
Perform one of the operations defined by the STC_CMD_
constants.
cmd (int) –
Colourise a segment of the document using the current lexing language.
start (int) –
end (int) –
Find the next line at or after lineStart that is a contracted fold header line.
Return -1 when no more lines.
lineStart (int) –
int
Convert all line endings in the document to one mode.
eolMode (int) –
Copy the selection to the clipboard.
Copy the selection, if selection empty copy the line with the caret.
Copy a range of text to the clipboard.
Positions are clipped into the document.
start (int) –
end (int) –
Copy argument text to the clipboard.
length (int) –
text (string) –
Count characters between two positions.
startPos (int) –
endPos (int) –
int
Create the UI elements for a STC
that was created with the default constructor.
(For 2-phase create.)
Create a new document object.
Starts with reference count of 1 and not selected into editor.
Create an ILoader.
bytes (int) –
Cut the selection to the clipboard.
Delete back from the current position to the start of the line.
Delete forwards from the current position to the end of the line.
Delete the word to the left of the caret.
Delete the word to the right of the caret.
Delete the word to the right of the caret, but not the trailing non-word characters.
Delete the selection or if no selection, the character before the caret.
Delete the selection or if no selection, the character before the caret.
Will not delete the character before at the start of a line.
Delete a range of text in the document.
pos (int) –
deleteLength (int) –
Retrieve a ‘
‘ separated list of descriptions of the keyword sets understood by the current lexer.
string
Describe a property.
name (string) –
string
Allow for simulating a DnD DragOver.
x (int) –
y (int) –
defaultRes (DragResult) –
Allow for simulating a DnD DropText.
x (long) –
y (long) –
data (string) –
bool
Find the document line of a display line taking hidden lines into account.
lineDisplay (int) –
int
Move caret to last position in document.
Move caret to last position in document extending selection to new caret position.
Move caret to first position in document.
Move caret to first position in document extending selection to new caret position.
Switch from insert to overtype mode or the reverse.
Delete the undo history.
End a sequence of actions that is undone and redone as a unit.
Ensure the caret is visible.
Ensure a particular line is visible by expanding any header line hiding it.
line (int) –
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.
line (int) –
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.
line (int) –
column (int) –
int
Find some text in the document.
minPos (int) –
maxPos (int) –
text (string) –
flags (int) –
int
Insert a Form Feed character.
On Windows, will draw the document into a display context such as a printer.
Get the foreground colour of additional carets.
Whether additional carets will blink.
bool
Whether additional carets are visible.
bool
Get the alpha of the selection.
int
Whether typing can be performed into multiple selections.
bool
Are all lines visible?
bool
Returns the position of the opposite end of the selection to the caret.
int
Does a backspace pressed when caret is within indentation unindent?
bool
Is drawing done first into a buffer or direct to the screen?
bool
Get the background alpha of the caret line.
int
Get the colour of the background of the line containing the caret.
Is the background of the line containing the caret in a different colour?
bool
Get the time in milliseconds that the caret is on and off.
int
Can the caret preferred x position only be changed by explicit movement commands?
int
Returns the current style of the caret.
int
Returns the width of the insert mode caret.
int
Returns the character byte at the position.
pos (int) –
int
Compact the document buffer and return a read-only memoryview object of the characters in the document.
PyObject
variant (WindowVariant) –
Get the code page used to interpret the bytes of the document as characters.
int
Retrieve the column number of a position, taking tab width into account.
pos (int) –
int
Get the way control characters are displayed.
int
Retrieve the text of the line containing the caret.
Returns the index of the caret on the line.
tuple
( String , linePos )
Retrieve the text of the line containing the caret.
Returns the index of the caret on the line.
tuple
( CharBuffer , linePos )
Returns the line number of the line with the caret.
int
Returns the position of the caret.
int
Returns the style currently used for the new text.
See also
Retrieve a pointer to the document object.
Retrieve the current end of line mode - one of CRLF
, CR
, or LF
.
int
Retrieve the column number which text should be kept within.
int
Retrieve the edge highlight mode.
int
Retrieve whether the maximum scroll position has the last line at the bottom of the view.
bool
Retrieve the position of the last correctly styled character.
int
Get extra ascent for each line.
int
Get extra descent for each line.
int
Retrieve the display line at the top of the display.
int
Is a header line expanded?
line (int) –
bool
Retrieve the fold level of a line.
line (int) –
int
Find the parent line of a child line.
line (int) –
int
Return a position which, to avoid performance costs, should not be within the range of a call to GetRangePointer.
int
Get the highlighted indentation guide column.
int
Returns the current hint string.
See SetHint
for more information about hints.
string
New in version 2.9.0.
Get whether underlining for active hotspots.
bool
Get the HotspotSingleLine property.
bool
Get the identifier.
int
Retrieve indentation size.
int
Are the indentation guides visible?
int
Get the current indicator.
int
Get the current indicator value.
int
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)
long
Are keys always interpreted as Unicode?
bool
Find the last child line of a header line.
line (int) –
level (int) –
int
Can be used to prevent the EVT_CHAR
handler from adding the char.
bool
Returns the zero based index of the last position in the text control, which is equal to the number of characters in the control.
long
Retrieve the degree of caching of layout information.
int
Returns the number of bytes in the document.
int
Retrieve the lexing language of the document.
int
Retrieve the contents of a line.
line (int) –
string
Returns the number of lines in the document.
There is always at least one.
int
Get the position after the last visible characters on a line.
line (int) –
int
Retrieve the position before the first non indentation character on a line.
line (int) –
int
Retrieve the number of columns that a line is indented.
line (int) –
int
n (long) –
int
Retrieve the contents of a line.
line (int) –
CharBuffer
Retrieve the position of the end of the selection at the given line (INVALID_POSITION
if no selection on this line).
line (int) –
int
Retrieve the position of the start of the selection at the given line (INVALID_POSITION
if no selection on this line).
line (int) –
int
Retrieve the extra styling information for a line.
line (int) –
int
n (long) –
string
Is a line visible?
line (int) –
bool
Which selection is the main selection.
int
Retrieve the cursor shown in a margin.
margin (int) –
int
Returns the size in pixels of the left margin.
int
Retrieve the marker mask of a margin.
margin (int) –
int
Get the margin options.
int
Returns the size in pixels of the right margin.
int
Retrieve the mouse click sensitivity of a margin.
margin (int) –
bool
Retrieve the type of a margin.
margin (int) –
int
Retrieve the width of a margin in pixels.
margin (int) –
int
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.
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
Which symbol was defined for markerNumber with MarkerDefine.
markerNumber (int) –
int
Retrieve the last line number that has line state.
int
Get which document modification events are sent to the container.
int
Is the document different from when it was last saved?
bool
Get whether mouse gets captured.
bool
Retrieve the time the mouse must sit still to generate a mouse dwell event.
int
Retrieve the effect of pasting when there are multiple selections.
int
Whether multiple selections can be made.
bool
int
Returns True
if overtype mode is active otherwise False
is returned.
bool
Get convert-on-paste setting.
bool
How many entries are allocated to the position cache?
int
Returns the print colour mode.
int
Returns the print magnification.
int
Is printing line wrapped?
int
Retrieve a ‘property’ value previously set with SetProperty.
key (string) –
string
Retrieve a ‘property’ value previously set with SetProperty, with ‘$()’ variable replacement on returned buffer.
key (string) –
string
Retrieve a ‘property’ value previously set with SetProperty, interpreted as an int AFTER
any ‘$()’ variable replacement.
key (string) –
int
Get the set of characters making up punctuation characters.
string
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.
from_ (long) –
to_ (long) –
string
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.
PyObject
In read-only mode?
bool
int
int
int
int
Get the modifier key used for rectangular selection.
int
Get cursor type.
int
Get internal focus flag.
bool
Retrieve the document width assumed for scrolling.
int
Retrieve whether the scroll width tracks wide lines.
bool
Get the search flags used by SearchInTarget.
int
Get the alpha of the selection.
int
Is the selection end of line filled?
bool
Retrieve the selected text.
string
Retrieve the selected text.
CharBuffer
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.
tuple
Returns the position at the end of the selection.
int
Get the mode of the current selection.
int
selection (int) –
int
selection (int) –
int
selection (int) –
int
selection (int) –
int
Returns the position at the end of the selection.
selection (int) –
int
Returns the position at the start of the selection.
selection (int) –
int
Returns the position at the start of the selection.
int
How many selections are there?
int
Get error status.
int
Gets the text currently selected in the control.
If there is no selection, the returned string is empty.
string
position (long) –
style (wx.TextAttr) –
bool
Returns the style byte at the position.
pos (int) –
int
Retrieve number of bits in style bytes used to hold the lexical state.
int
Retrieve the number of bits the current lexer needs for styling.
int
Retrieve a buffer of cells.
startPos (int) –
endPos (int) –
MemoryBuffer
Does a tab pressed when caret is within indentation indent?
bool
Retrieve the visible size of a tab.
int
Retrieve the value of a tag from a regular expression search.
tagNumber (int) –
string
Get the position that ends the target.
int
Get the position that starts the target.
int
Get the tech.
int
Retrieve all the text in the document.
string
Retrieve the number of characters in the document.
int
Retrieve a range of text.
startPos (int) –
endPos (int) –
string
Retrieve a range of text.
startPos (int) –
endPos (int) –
CharBuffer
Retrieve all the text in the document.
CharBuffer
Is drawing done in two phases with backgrounds drawn before foregrounds?
bool
Is undo history being collected?
bool
Is the horizontal scroll bar visible?
bool
Retrieve whether tabs will be used in indentation.
bool
Is the vertical scroll bar visible?
bool
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.
string
Are the end of line characters visible?
bool
Are white space characters currently visible? Returns one of SCWS_
constants.
int
int
Get the set of characters making up whitespace for when moving or selecting by word.
string
Get the size of the dots used to mark space characters.
int
Get the set of characters making up words for when moving or selecting by word.
string
Retrieve how wrapped sublines are placed.
Default is fixed.
int
Retrieve whether text is word wrapped.
int
Retrieve the start indent for wrapped lines.
int
Retrieve the display mode of visual flags for wrapped lines.
int
Retrieve the location of visual flags for wrapped lines.
int
int
Retrieve the zoom level.
int
Set caret to start of a line and ensure it is visible.
line (int) –
Set caret to a position and ensure it is visible.
pos (int) –
Make a range of lines invisible.
lineStart (int) –
lineEnd (int) –
Draw the selection in normal style or with selection highlighted.
normal (bool) –
pt (wx.Point) –
tuple
( wx.TextCtrlHitTestResult, pos )
pt (wx.Point) –
tuple
( wx.TextCtrlHitTestResult, col, row )
Move caret to first position on line.
Move caret to first position on display line.
Move caret to first position on display line extending selection to new caret position.
Move caret to first position on line extending selection to new caret position.
Move caret to first position on line, extending rectangular selection to new caret position.
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)?.
Are any indicators present at position?
position (int) –
int
Turn a indicator off over a range.
position (int) –
clearLength (int) –
Where does a particular indicator end?
indicator (int) –
position (int) –
int
Turn a indicator on over a range.
position (int) –
fillLength (int) –
Get the alpha fill colour of the given indicator.
indicator (int) –
int
Retrieve the foreground colour of an indicator.
indic (int) –
Get the alpha outline colour of the given indicator.
indicator (int) –
int
Retrieve the style of an indicator.
indic (int) –
int
Retrieve whether indicator drawn under or over text.
indic (int) –
bool
Set the alpha fill colour of the given indicator.
indicator (int) –
alpha (int) –
Set the foreground colour of an indicator.
indic (int) –
fore (wx.Colour) –
Set the alpha outline colour of the given indicator.
indicator (int) –
alpha (int) –
Set an indicator to plain, squiggle or TT
.
indic (int) –
style (int) –
Set an indicator to draw under text or over(default).
indic (int) –
under (bool) –
Where does a particular indicator start?
indicator (int) –
position (int) –
int
What value does a particular indicator have at at a position?
indicator (int) –
position (int) –
int
Insert string at a position.
pos (int) –
text (string) –
Insert string at a position.
pos (int) –
text (int) –
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
.
bool
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.
bool
New in version 2.7.1.
bool
Copy the line containing the caret.
Cut the line containing the caret.
Delete the line containing the caret.
Move caret down one line.
Move caret down one line extending selection to new caret position.
Move caret down one line, extending rectangular selection to new caret position.
Duplicate the current line.
Move caret to last position on line.
Move caret to last position on display line.
Move caret to last position on display line extending selection to new caret position.
Move caret to last position on line extending selection to new caret position.
Move caret to last position on line, extending rectangular selection to new caret position.
Retrieve the line containing a position.
pos (int) –
int
How many characters are on a line, including end of line characters?
line (int) –
int
Scroll horizontally and vertically.
columns (int) –
lines (int) –
Scroll the document down, keeping the caret visible.
Scroll the document up, keeping the caret visible.
Switch the current line with the previous.
Move caret up one line.
Move caret up one line extending selection to new caret position.
Move caret up one line, extending rectangular selection to new caret position.
Join the lines in the target.
Retrieves the number of lines completely visible.
int
Split the lines in the target into lines that are less wide than pixelWidth where possible.
pixelWidth (int) –
Load the contents of filename into the editor.
filename (string) –
bool
Transform the selection to lower case.
Get the style number for the text margin for a line.
line (int) –
int
Get the start of the range of style numbers used for margin text.
int
Get the styles in the text margin for a line.
line (int) –
string
Get the text in the text margin for a line.
line (int) –
string
Set the style number for the text margin for a line.
line (int) –
style (int) –
Get the start of the range of style numbers used for margin text.
style (int) –
Set the style in the text margin for a line.
line (int) –
styles (string) –
Set the text in the text margin for a line.
line (int) –
text (string) –
Clear the margin text on all lines.
Add a marker to a line, returning an ID
which can be used to find or delete the marker.
line (int) –
markerNumber (int) –
int
Add a set of markers to a line.
line (int) –
set (int) –
Set the symbol used for a particular marker number, and optionally the fore and background colours.
Define a marker from a bitmap.
markerNumber (int) –
bmp (wx.Bitmap) –
Define a marker from RGBA
data.
It has the width and height from RGBAImageSetWidth/Height. You must ensure that the buffer is at least widthheight4 bytes long.
Delete a marker from a line.
line (int) –
markerNumber (int) –
Delete all markers with a particular number from all lines.
markerNumber (int) –
Delete a marker.
handle (int) –
Enable/disable highlight for current folding bloc (smallest one that contains the caret)
enabled (bool) –
Get a bit mask of all the markers set on a line.
line (int) –
int
Retrieve the line number at which a particular marker is located.
handle (int) –
int
Find the next line at or after lineStart that includes a marker in mask.
Return -1 when no more lines.
lineStart (int) –
markerMask (int) –
int
Find the previous line before lineStart that includes a marker in mask.
lineStart (int) –
markerMask (int) –
int
Set the alpha used for a marker that is drawn in the text area, not the margin.
markerNumber (int) –
alpha (int) –
Set the background colour used for a particular marker number.
markerNumber (int) –
back (wx.Colour) –
Set the background colour used for a particular marker number when its folding block is selected.
markerNumber (int) –
back (wx.Colour) –
Set the foreground colour used for a particular marker number.
markerNumber (int) –
fore (wx.Colour) –
Move the caret inside current view if it’s not there already.
Move the selected lines down one line, shifting the line below before the selection.
Move the selected lines up one line, shifting the line above after the selection.
Insert a new line, may use a CRLF
, CR
or LF
depending on EOL
mode.
Move caret one page down.
Move caret one page down extending selection to new caret position.
Move caret one page down, extending rectangular selection to new caret position.
Move caret one page up.
Move caret one page up extending selection to new caret position.
Move caret one page up, extending rectangular selection to new caret position.
Move caret between paragraphs (delimited by empty lines).
Paste the contents of the clipboard into the document replacing the selection.
Retrieve the point in the window where a position is displayed.
pos (int) –
Given a valid document position, return the next position taking code page into account.
Maximum value returned is the last position in the document.
pos (int) –
int
Given a valid document position, return the previous position taking code page into account.
Returns 0 if passed 0.
pos (int) –
int
Retrieve the position at the start of a line.
line (int) –
int
Find the position from a point within the window.
pt (wx.Point) –
int
Find the position from a point within the window but return INVALID_POSITION
if not close to text.
x (int) –
y (int) –
int
Converts given text position to client coordinates in pixels.
This function allows finding where is the character at the given position displayed in the text control.
pos (long) – Text position in 0 to GetLastPosition
range (inclusive).
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.
See also
pos (long) –
tuple
( bool, x, y )
For private communication between an application and a known lexer.
operation (int) –
pointer –
Retrieve a ‘
‘ separated list of properties understood by the current lexer.
string
Retrieve the type of a property.
name (string) –
int
Set the height for future RGBA
image data.
height (int) –
Set the width for future RGBA
image data.
width (int) –
Redoes the next action on the undo history.
Register an image for use in autocompletion lists.
type (int) –
bmp (wx.Bitmap) –
Register an RGBA
image for use in autocompletion lists.
It has the width and height from RGBAImageSetWidth/Height. You must ensure that the buffer is at least widthheight4 bytes long.
Release a reference to the document, deleting document if it fades to black.
docPointer –
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.
from_ (long) –
to_ (long) –
The first position.
The last position.
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.
from_ (long) –
to_ (long) –
value (string) – The value to replace the existing text with.
The first position.
The last position.
Replace the selected text with the argument text.
text (string) –
Replace the target text with the argument text.
Text is counted so it can contain NULs. Returns the length of the replacement text.
text (string) –
int
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.
text (string) –
int
Set the main selection to the next selection.
Write the contents of the editor to filename.
filename (string) –
bool
Scroll enough to make the given column visible.
column (int) –
Scroll to end of document.
Scroll enough to make the given line visible.
line (int) –
Scroll to start of document.
Sets the current caret position to be the search anchor.
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.
text (string) –
int
Find some text starting at the search anchor.
Does not ensure the selection is visible.
flags (int) –
text (string) –
int
Find some text starting at the search anchor and moving backwards.
Does not ensure the selection is visible.
flags (int) –
text (string) –
int
Select all the text in the document.
Deselects selected text in the control.
New in version 2.9.5.
Duplicate the selection.
If selection empty duplicate the line containing the caret.
Is the selection rectangular? The alternative is the more common stream selection.
bool
Send a message to Scintilla.
msg (int) –
wp (wx.UIntPtr) –
lp (wx.IntPtr) –
wx.IntPtr
Set the foreground colour of additional carets.
fore (wx.Colour) –
Set whether additional carets will blink.
additionalCaretsBlink (bool) –
Set whether additional carets are visible.
additionalCaretsBlink (bool) –
Set the alpha of the selection.
alpha (int) –
Set the background colour of additional selections.
Must have previously called SetSelBack with non-zero first argument for this to have an effect.
back (wx.Colour) –
Set the foreground colour of additional selections.
Must have previously called SetSelFore with non-zero first argument for this to have an effect.
fore (wx.Colour) –
Set whether typing can be performed into multiple selections.
additionalSelectionTyping (bool) –
Set the selection anchor to a position.
The anchor is the opposite end of the selection from the caret.
posAnchor (int) –
Sets whether a backspace pressed when caret is within indentation unindents.
bsUnIndents (bool) –
If drawing is buffered then each line of text is drawn into a bitmap buffer before drawing it to the screen to avoid flicker.
buffered (bool) –
Set the foreground colour of the caret.
fore (wx.Colour) –
Set background alpha of the caret line.
alpha (int) –
Set the colour of the background of the line containing the caret.
back (wx.Colour) –
Display the background of the line containing the caret in a different colour.
show (bool) –
Get the time in milliseconds that the caret is on and off.
0 = steady on.
periodMilliseconds (int) –
Stop the caret preferred x position changing when the user types.
useCaretStickyBehaviour (int) –
Set the style of the caret to be drawn.
caretStyle (int) –
Set the width of the insert mode caret.
pixelWidth (int) –
Reset the set of characters for whitespace and word characters to the defaults.
Set the code page used to interpret the bytes of the document as characters.
codePage (int) –
Change the way control characters are displayed: If symbol is < 32, keep the drawn way, else, use the given character.
symbol (int) –
Sets the position of the caret.
pos (int) –
style (wx.TextAttr) –
bool
Change the document object used.
docPointer –
Set the current end of line mode.
eolMode (int) –
Change the colour used in edge indication.
edgeColour (wx.Colour) –
Set the column number of the edge.
If text goes past the edge then it is highlighted.
column (int) –
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
).
mode (int) –
Makes the text item editable or read-only, overriding the wx.TE_READONLY
flag.
editable (bool) – If True
, the control is editable. If False
, the control is read-only.
See also
Set caret to a position, while removing any existing selection.
pos (int) –
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.
endAtLastLine (bool) –
Set extra ascent for each line.
extraAscent (int) –
Set extra descent for each line.
extraDescent (int) –
Scroll so that a display line is at the top of the display.
lineDisplay (int) –
Show the children of a header line.
line (int) –
expanded (bool) –
Set some style options for folding.
flags (int) –
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.
line (int) –
level (int) –
Set the colours used as a chequerboard pattern in the fold margin.
useSetting (bool) –
back (wx.Colour) –
Set the horizontal scrollbar to use instead of the ont that’s built-in.
bar (wx.ScrollBar) –
Set the highlighted indentation guide column.
0 = no highlighted guide.
column (int) –
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.
hint (string) –
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.
Set a back colour for active hotspots.
useSetting (bool) –
back (wx.Colour) –
Set a fore colour for active hotspots.
useSetting (bool) –
fore (wx.Colour) –
Enable / Disable underlining active hotspots.
underline (bool) –
Limit hotspots to single line so hotspots on two lines don’t merge.
singleLine (bool) –
Set the identifier reported as idFrom in notification messages.
identifier (int) –
Set the number of spaces used for one level of indentation.
indentSize (int) –
Show or hide indentation guides.
indentView (int) –
Set the indicator used for IndicatorFillRange and IndicatorClearRange.
indicator (int) –
Set the value used for IndicatorFillRange.
value (int) –
Sets the insertion point at the given position.
pos (long) – Position to set, in the range from 0 to GetLastPosition
inclusive.
Sets the insertion point at the end of the text control.
This is equivalent to calling wx.TextCtrl.SetInsertionPoint
with wx.TextCtrl.GetLastPosition
argument.
Set up the key words used by the lexer.
keywordSet (int) –
keyWords (string) –
Always interpret keyboard input as Unicode.
keysUnicode (bool) –
val (bool) –
Sets the degree of caching of layout information.
mode (int) –
Set the lexing language of the document.
lexer (int) –
Set the lexing language of the document based on string name.
language (string) –
Change the indentation of a line to a number of columns.
line (int) –
indentSize (int) –
Used to hold extra styling information for each line.
line (int) –
state (int) –
Set the main selection.
selection (int) –
Set the cursor shown when the mouse is inside a margin.
margin (int) –
cursor (int) –
Sets the size in pixels of the left margin.
pixelWidth (int) –
Set a mask that determines which markers are displayed in a margin.
margin (int) –
mask (int) –
Set the margin options.
marginOptions (int) –
Sets the size in pixels of the right margin.
pixelWidth (int) –
Make a margin sensitive or insensitive to mouse clicks.
margin (int) –
sensitive (bool) –
Set a margin to be either numeric or symbolic.
margin (int) –
marginType (int) –
Set the width of a margin to a width expressed in pixels.
margin (int) –
pixelWidth (int) –
Set the left and right margin in the edit area, measured in pixels.
left (int) –
right (int) –
This function sets the maximum number of characters the user can enter into the control.
In other words, it allows limiting 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.
len (long) –
Set which document modification events are sent to the container.
mask (int) –
Marks the control as being modified by the user or not.
modified (bool) –
See also
Set whether the mouse is captured when its button is pressed.
captures (bool) –
Sets the time the mouse must sit still to generate a mouse dwell event.
periodMilliseconds (int) –
Change the effect of pasting when there are multiple selections.
multiPaste (int) –
Set whether multiple selections can be made.
multipleSelection (bool) –
Set to overtype (True
) or insert mode.
overtype (bool) –
Enable/Disable convert-on-paste for line endings.
convert (bool) –
Set number of entries in position cache.
size (int) –
Modify colours when printing for clearer printed text.
mode (int) –
Sets the print magnification added to the point size of each style for printing.
magnification (int) –
Set printing to line wrapped (SC_WRAP_WORD
) or not line wrapped (SC_WRAP_NONE
).
mode (int) –
Set up a value that may be used by a lexer for some optional feature.
key (string) –
value (string) –
Set the set of characters making up punctuation characters Should be called after SetWordChars.
characters (string) –
Set to read only or read write.
readOnly (bool) –
posAnchor (int) –
space (int) –
pos (int) –
space (int) –
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
.
modifier (int) –
Sets the cursor to one of the SC_CURSOR
values.
cursorType (int) –
Change internal focus flag.
focus (bool) –
Remember the current position in the undo history as the position at which the document was saved.
Sets the document width assumed for scrolling.
pixelWidth (int) –
Sets whether the maximum width line displayed is used to set scroll width.
tracking (bool) –
Set the search flags used by SearchInTarget.
flags (int) –
Set the alpha of the selection.
alpha (int) –
Set the background colour of the main and additional selections and whether to use this setting.
useSetting (bool) –
back (wx.Colour) –
Set the selection to have its end of line filled or not.
filled (bool) –
Set the foreground colour of the main and additional selections and whether to use this setting.
useSetting (bool) –
fore (wx.Colour) –
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.
from_ (long) –
to_ (long) –
The first position.
The last position.
See also
Sets the position that ends the selection - this becomes the currentPosition.
pos (int) –
Set the selection mode to stream (SC_SEL_STREAM
) or rectangular (SC_SEL_RECTANGLE/SC_SEL_THIN) or by lines (SC_SEL_LINES
).
mode (int) –
selection (int) –
posAnchor (int) –
selection (int) –
space (int) –
selection (int) –
pos (int) –
selection (int) –
space (int) –
Sets the position that ends the selection - this becomes the currentPosition.
selection (int) –
pos (int) –
Sets the position that starts the selection - this becomes the anchor.
selection (int) –
pos (int) –
Sets the position that starts the selection - this becomes the anchor.
pos (int) –
Change error status - 0 = wx.OK
.
statusCode (int) –
start (long) –
end (long) –
style (wx.TextAttr) –
bool
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.
bits (int) –
Set the styles for a segment of the document.
length (int) –
styleBytes (int) –
Change style from current styling position for length characters to a style and move the current styling position to after this newly styled segment.
length (int) –
style (int) –
Sets whether a tab pressed when caret is within indentation indents.
tabIndents (bool) –
Change the visible size of a tab to be a multiple of the width of a space character.
tabWidth (int) –
Sets the position that ends the target which is used for updating the document without affecting the scroll position.
pos (int) –
Sets the position that starts the target which is used for updating the document without affecting the scroll position.
pos (int) –
Set the technology used.
technology (int) –
Replace the contents of the document with the argument text.
text (string) –
Replace the contents of the document with the argument text.
text (int) –
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.
twoPhase (bool) –
Choose between collecting actions into the undo history and discarding them.
collectUndo (bool) –
Show or hide the horizontal scroll bar.
show (bool) –
Indentation will only use space characters if useTabs is False
, otherwise it will use a combination of tabs and spaces.
useTabs (bool) –
Show or hide the vertical scroll bar.
show (bool) –
Set the vertical scrollbar to use instead of the ont that’s built-in.
bar (wx.ScrollBar) –
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.
value (string) – The new value to set. It may contain newline characters if the text control is multi-line.
Make the end of line characters visible or invisible.
visible (bool) –
Make white space characters invisible, always visible or visible outside indentation.
viewWS (int) –
virtualSpaceOptions (int) –
Set the way the display area is determined when a particular line is to be moved to by Find, FindNext, GotoLine, etc.
visiblePolicy (int) –
visibleSlop (int) –
Set the background colour of all whitespace and whether to use this setting.
useSetting (bool) –
back (wx.Colour) –
Set the set of characters making up whitespace for when moving or selecting by word.
Should be called after SetWordChars.
characters (string) –
Set the foreground colour of all whitespace and whether to use this setting.
useSetting (bool) –
fore (wx.Colour) –
Set the size of the dots used to mark space characters.
size (int) –
Set the set of characters making up words for when moving or selecting by word.
First sets defaults like SetCharsDefault.
characters (string) –
Sets how wrapped sublines are placed.
Default is fixed.
mode (int) –
Sets whether text is word wrapped.
mode (int) –
Set the start indent for wrapped lines.
indent (int) –
Set the display mode of visual flags for wrapped lines.
wrapVisualFlags (int) –
Set the location of visual flags for wrapped lines.
wrapVisualFlagsLocation (int) –
Set the way the caret is kept visible when going sideways.
The exclusion zone is given in pixels.
caretPolicy (int) –
caretSlop (int) –
Get and Set the xOffset (ie, horizontal scroll position).
newOffset (int) –
Set the way the line the caret is on is kept visible.
The exclusion zone is given in lines.
caretPolicy (int) –
caretSlop (int) –
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.
zoom (int) –
Make a range of lines visible.
lineStart (int) –
lineEnd (int) –
pos (long) –
Start notifying the container of all key presses and commands.
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.
pos (int) –
mask (int) –
Stop notifying the container of all key presses and commands.
Move caret to bottom of page, or one page down if already at bottom of page.
Move caret to bottom of page, or one page down if already at bottom of page, extending selection to new caret position.
Move caret to top of page, or one page up if already at top of page.
Move caret to top of page, or one page up if already at top of page, extending selection to new caret position.
Clear all the styles and make equivalent to the global default style.
Get the background colour of a style.
style (int) –
Get is a style bold or not.
style (int) –
bool
Get is a style mixed case, or to force upper or lower case.
style (int) –
int
Get is a style changeable or not (read only).
Experimental feature, currently buggy.
style (int) –
bool
Get the character set of the font in a style.
style (int) –
int
Get is a style to have its end of line filled or not.
style (int) –
bool
Get the font facename of a style.
style (int) –
string
Get the foreground colour of a style.
style (int) –
Get is a style a hotspot or not.
style (int) –
bool
Get is a style italic or not.
style (int) –
bool
Get the size of characters of a style.
style (int) –
int
Get the size of characters of a style in points multiplied by 100.
style (int) –
int
Get is a style underlined or not.
style (int) –
bool
Get is a style visible or not.
style (int) –
bool
Get the weight of characters of a style.
style (int) –
int
Reset the default style to its state at startup.
Set the background colour of a style.
style (int) –
back (wx.Colour) –
Set a style to be bold or not.
style (int) –
bold (bool) –
Set a style to be mixed case, or to force upper or lower case.
style (int) –
caseForce (int) –
Set a style to be changeable or not (read only).
Experimental feature, currently buggy.
style (int) –
changeable (bool) –
Set the character set of the font in a style.
Converts the Scintilla character set values to a FontEncoding.
style (int) –
characterSet (int) –
Set a style to have its end of line filled or not.
style (int) –
filled (bool) –
Set the font of a style.
style (int) –
fontName (string) –
Set style size, face, bold, italic, and underline attributes from a wx.Font’s attributes.
styleNum (int) –
font (wx.Font) –
Set all font style attributes at once.
styleNum (int) –
size (int) –
faceName (string) –
bold (bool) –
italic (bool) –
underline (bool) –
encoding (FontEncoding) –
Set the font encoding to be used by a style.
style (int) –
encoding (FontEncoding) –
Set the foreground colour of a style.
style (int) –
fore (wx.Colour) –
Set a style to be a hotspot or not.
style (int) –
hotspot (bool) –
Set a style to be italic or not.
style (int) –
italic (bool) –
Set the size of characters of a style.
style (int) –
sizePoints (int) –
Set the size of characters of a style.
Size is in points multiplied by 100.
style (int) –
caseForce (int) –
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
styleNum (int) –
spec (string) –
Set a style to be underlined or not.
style (int) –
underline (bool) –
Set a style to be visible or not.
style (int) –
visible (bool) –
Set the weight of characters of a style.
style (int) –
weight (int) –
Swap that caret and anchor of the main selection.
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.
Make the target range start and end be the same as the selection range start and end.
Retrieve the height of a particular line of text in pixels.
line (int) –
int
Measure the pixel width of some text in a particular style.
NUL
terminated text argument. Does not handle tab or control characters.
style (int) –
text (string) –
int
Switch between sticky and non-sticky: meant to be bound to a key.
Switch a header line between expanded and contracted.
line (int) –
Undo one action in the undo history.
Transform the selection to upper case.
Set whether a pop up menu is displayed automatically when the user presses the wrong mouse button.
allowPopUp (bool) –
Display a list of strings and send notification when user chooses one.
listType (int) –
itemList (string) –
Move caret to before first visible character on line.
If already there move to first character on line.
Like VCHome but extending selection to new caret position.
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.
Centre current line in window.
Find the display line of a document line taking hidden lines into account.
line (int) –
int
Get position of end of word.
pos (int) –
onlyWordCharacters (bool) –
int
Move caret left one word.
Move caret left one word, position cursor at end of word.
Move caret left one word, position cursor at end of word, extending selection to new caret position.
Move caret left one word extending selection to new caret position.
Move to the previous change in capitalisation.
Move to the previous change in capitalisation extending selection to new caret position.
Move to the change next in capitalisation.
Move to the next change in capitalisation extending selection to new caret position.
Move caret right one word.
Move caret right one word, position cursor at end of word.
Move caret right one word, position cursor at end of word, extending selection to new caret position.
Move caret right one word extending selection to new caret position.
Get position of start of word.
pos (int) –
onlyWordCharacters (bool) –
int
The number of display lines needed to wrap a document line.
line (int) –
int
Writes the text into the text control at the current insertion position.
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.
x (long) –
y (long) –
long
Magnify the displayed text by increasing the sizes by 1 point.
Make the displayed text smaller by decreasing the sizes by 1 point.
NOP
, for file-like compatibility.
Append text to the textctrl, for file-like compatibility.
See GetAdditionalCaretForeground
and SetAdditionalCaretForeground
See GetAdditionalCaretsVisible
and SetAdditionalCaretsVisible
See GetAdditionalSelectionTyping
and SetAdditionalSelectionTyping
See GetBufferedDraw
and SetBufferedDraw
See GetCaretForeground
and SetCaretForeground
See GetCaretPeriod
and SetCaretPeriod
See GetCaretSticky
and SetCaretSticky
See GetCaretStyle
and SetCaretStyle
See GetCaretWidth
and SetCaretWidth
See GetCodePage
and SetCodePage
See GetCurLine
See GetCurLineRaw
See GetCurrentLine
See GetCurrentPos
and SetCurrentPos
See GetDefaultStyle
and SetDefaultStyle
See GetDocPointer
and SetDocPointer
See GetEOLMode
and SetEOLMode
See GetEdgeColour
and SetEdgeColour
See GetEdgeColumn
and SetEdgeColumn
See GetEdgeMode
and SetEdgeMode
See GetEndAtLastLine
and SetEndAtLastLine
See GetEndStyled
See GetExtraAscent
and SetExtraAscent
See GetExtraDescent
and SetExtraDescent
See GetGapPosition
See GetHighlightGuide
and SetHighlightGuide
See GetIdentifier
and SetIdentifier
See GetIndicatorValue
and SetIndicatorValue
See GetInsertionPoint
and SetInsertionPoint
See GetKeysUnicode
and SetKeysUnicode
See GetLastPosition
See GetLayoutCache
and SetLayoutCache
See GetLineCount
See GetMainSelection
and SetMainSelection
See GetMarginLeft
and SetMarginLeft
See GetMarginOptions
and SetMarginOptions
See GetMarginRight
and SetMarginRight
See GetMargins
See GetMaxLineState
See GetModEventMask
and SetModEventMask
See GetMouseDwellTime
and SetMouseDwellTime
See GetMultiPaste
and SetMultiPaste
See GetNumberOfLines
See GetOvertype
and SetOvertype
See GetPrintColourMode
and SetPrintColourMode
See GetPrintWrapMode
and SetPrintWrapMode
See GetRangePointer
See GetReadOnly
and SetReadOnly
See GetRectangularSelectionAnchor
and SetRectangularSelectionAnchor
See GetRectangularSelectionAnchorVirtualSpace
and SetRectangularSelectionAnchorVirtualSpace
See GetRectangularSelectionCaret
and SetRectangularSelectionCaret
See GetRectangularSelectionCaretVirtualSpace
and SetRectangularSelectionCaretVirtualSpace
See GetRectangularSelectionModifier
and SetRectangularSelectionModifier
See GetSTCCursor
and SetSTCCursor
See GetSTCFocus
and SetSTCFocus
See GetScrollWidth
and SetScrollWidth
See GetSearchFlags
and SetSearchFlags
See GetSelAlpha
and SetSelAlpha
See GetSelEOLFilled
and SetSelEOLFilled
See GetSelectedText
See GetSelectionEnd
and SetSelectionEnd
See GetSelectionMode
and SetSelectionMode
See GetSelectionStart
and SetSelectionStart
See GetSelections
See GetStyleBits
and SetStyleBits
See GetTabIndents
and SetTabIndents
See GetTabWidth
and SetTabWidth
See GetTargetEnd
and SetTargetEnd
See GetTargetStart
and SetTargetStart
See GetTechnology
and SetTechnology
See GetTextLength
See GetTextRaw
and SetTextRaw
See GetTwoPhaseDraw
and SetTwoPhaseDraw
See GetUndoCollection
and SetUndoCollection
See GetUseTabs
and SetUseTabs
See GetViewEOL
and SetViewEOL
See GetViewWhiteSpace
and SetViewWhiteSpace
See GetWhitespaceChars
and SetWhitespaceChars
See GetWhitespaceSize
and SetWhitespaceSize
See GetWordChars
and SetWordChars
See GetWrapIndentMode
and SetWrapIndentMode
See GetWrapMode
and SetWrapMode
See GetWrapStartIndent
and SetWrapStartIndent
See GetWrapVisualFlags
and SetWrapVisualFlags
See GetWrapVisualFlagsLocation
and SetWrapVisualFlagsLocation
See GetXOffset
and SetXOffset