Class TextView | Terminal.Gui v1 (original) (raw)
Namespace
Assembly
Terminal.Gui.dll
Multi-line text editing View.
public class TextView : View, IDisposable, ISupportInitializeNotification, ISupportInitialize
Inheritance
TextView
Implements
Inherited Members
Constructors
Initializes a TextView on the specified area, with dimensions controlled with the X, Y, Width and Height properties.
Initializes a TextView on the specified area, with absolute position and size.
Properties
Gets or sets a value indicating whether pressing ENTER in a TextViewcreates a new line of text in the view or activates the default button for the toplevel.
Gets or sets whether the TextView inserts a tab character into the text or ignores tab input. If set to false
and the user presses the tab key (or shift-tab) the focus will move to the next view (or previous with shift-tab). The default is true
; if the user presses the tab key, a tab character will be inserted into the text.
Provides autocomplete context menu based on suggestions at the current cursor position. Populate AllSuggestions to enable this feature
The bottom offset needed to use a horizontal scrollbar or for another reason. This is only needed with the keyboard navigation.
Gets or sets a value indicating whether this Responder can focus.
Get the ContextMenu for this view.
Gets the cursor column.
Gets the current cursor row.
Sets or gets the current cursor position.
Get / Set the wished cursor when the field is focused
Gets or sets the frame for the view. The frame is relative to the view's container (SuperView).
Indicates whatever the text has history changes or not.true if the text has history changes false otherwise.
Indicates whatever the text was changed or not.true if the text was changed false otherwise.
Gets or sets the left column.
Gets the number of lines.
Gets the maximum visible length line.
Gets or sets a value indicating whether this TextView is a multiline text view.
Gets or sets whether the TextView is in read-only mode or not
The right offset needed to use a vertical scrollbar or for another reason. This is only needed with the keyboard navigation.
Length of the selected text.
The selected text.
Get or sets the selecting.
Start column position of the selected text.
Start row position of the selected text.
Gets or sets a value indicating the number of whitespace when pressing the TAB key.
Sets or gets the text in the TextView.
Gets or sets the top row.
Tracks whether the text view should be considered "used", that is, that the user has moved in the entry, so new input should be appended at the cursor position, rather than clearing the entry
Allows word wrap the to fit the available container width.
Methods
Allows clearing the HistoryText.HistoryTextItem items updating the original text.
Closes the contents of the stream into the TextView.
Copy the selected text to the clipboard contents.
Cut the selected text to the clipboard contents.
Deletes all text.
Deletes all the selected or a single character at left from the position of the cursor.
Deletes all the selected or a single character at right from the position of the cursor.
FindNextText(ustring, out bool, bool, bool, ustring, bool)
Find the next text based on the match case with the option to replace it.
FindPreviousText(ustring, out bool, bool, bool, ustring, bool)
Find the previous text based on the match case with the option to replace it.
Reset the flag to stop continuous find.
Returns the characters on the current line (where the cursor is positioned). Use CurrentColumn to determine the position of the cursor within that line
Determines the current ColorScheme based on the Enabled value.
Inserts the given toAdd
text at the current cursor position exactly as if the user had just typed it
Loads the contents of the file into the TextView.
Loads the contents of the stream into the TextView.
Method invoked when a mouse event is generated
Will scroll the TextView to the last line and position the cursor there.
Will scroll the TextView to the first line and position the cursor there.
Called when the contents of the TextView change. E.g. when the user types text or deletes text. Raises the ContentsChanged event.
Method invoked when a view gets focus.
Method invoked when a key is released.
Method invoked when a view loses focus.
OnUnwrappedCursorPosition(int?, int?)
Invoke the UnwrappedCursorPosition event with the unwrapped CursorPosition.
Paste the clipboard contents into the current selected position.
Positions the cursor on the current row and column
If the view is focused, gives the view a chance to process the keystroke.
Redraws this view and its subviews; only redraws the views that have been flagged for a re-display.
ReplaceAllText(ustring, bool, bool, ustring)
Replaces all the text based on the match case.
Will scroll the TextView to display the specified row at the top if isRow
is true or will scroll the TextView to display the specified column at the left if isRow
is false.
Select all text.
Sets the driver to the default color for the control where no text is being rendered. Defaults to Normal.
Sets the Driver to an appropriate color for rendering the given idx
of the current line
. Override to provide custom coloring by calling SetAttribute(Attribute)Defaults to Normal.
Sets the Driver to an appropriate color for rendering the given idx
of the current line
. Override to provide custom coloring by calling SetAttribute(Attribute)Defaults to Focus.
Sets the Driver to an appropriate color for rendering the given idx
of the current line
. Override to provide custom coloring by calling SetAttribute(Attribute)Defaults to Focus.
Sets the Driver to an appropriate color for rendering the given idx
of the current line
. Override to provide custom coloring by calling SetAttribute(Attribute)Defaults to HotFocus.
Events
Raised when the contents of the TextView are changed.
Raised when the Text property of the TextView changes.
Invoked with the unwrapped CursorPosition.