In This Topic
The following tables list the members exposed by NTextBox.
Public Constructors
Public Fields
Public Properties
| Name | Description |
| AcceptsEnter | Gets or set whether return characters are accepted as input. |
| AcceptsTab | Gets or set whether tab characters are accepted as input. |
| AllowContextPopup | Gets or sets whether the text box can display a context popup with the clipboard operations (Cut, Copy and Paste). |
| AlwaysShowCaret | Gets or sets whether to show the caret even when the text box does not have focus. |
| AlwaysShowSelection | Gets or sets whether to show selection even when the text box does not have focus. |
| CaretPos | Gets the current caret position. |
| CharacterCasing | Gets or sets the current character casing |
| ClearHistoryOnFocusOut | Gets or sets whether the text box should clear its history when the user moves the focus out of the control |
| Direction | Gets / sets the text direction |
| Hint | Gets or sets the text displayed when the text box is empty. |
| HintFill | Gets or sets the fill style of the text box hint. |
| MaxLength | Gets/Sets the maximum length of the text accepted by this text box. By default set to Int32.MaxValue. |
| Multiline | Gets or sets whether the text can span more than one line. |
| PasswordChar | Gets or sets the password char |
| ReadOnly | Gets or sets whether the text box allows the user to modify the text |
| RecordHistory | Gets or sets whether the text box will record history |
| SelectAllOnFocus | Gets or sets whether the text box will perform a select all operation when it gains focus |
| SelectionBackgroundFill | Gets/Sets the background fill of the selection. |
| SelectionTextFill | Gets/Sets the text fill of the selection. |
| ShowCaret | Gets / sets whether the text box must show the caret |
| Text | Gets or sets the text |
| TextAlign | Gets or sets the text alignment |
| WordWrap | Gets or sets whether lines are automatically word wrapped when multiline is enabled |
Top
Public Methods
| Name | Description |
| CanCopy | Determines whether the copy operation will place anything on the clipboard. |
| CanCut | Determines whether the cut operation will place anything on the clipboard. |
| CanPaste | Determines whether the paste operation can be performed |
| Copy | Copies the selected text to the clipboard. Returns true if any text has been set to the clipboard, otherwise returns false. |
| Cut | Cuts (removes) the selected text, and places it on the clipbard. Returns true if any text has been set to the clipboard, otherwise returns false. |
| DeselectAll | Deselects the selected text, if any |
| EnsureCaretVisible | Ensures that the caret is visible |
| GetCaretPos | Gets the current caret position. |
| InsertReplaceChar | Inserts a character at the current caret position and positions the caret on the next grapheme. If there is a selected text, it is first removed. |
| InsertReplaceText | Inserts text at the current caret position and positions the caret to the end of the inserted text. If there is a selected text, it is first removed. |
| InvalidateMeasure | Overridden. Invalidates the element measure and pools the element for measure validation. |
| IsSelectedRangeEmpty | Returns true, if the text box currently does not have any text selected. |
| MoveCaret | Overloaded. Moves the caret in the specified direction. Resets the selection. |
| Paste | Pastes text from the clipboard and performs an insert-replace text operation. Returns true if any text has been pasted from the clipboard, otherwise returns false. |
| Redo | Redos the last user operation |
| RemoveSelectedText | Removes the currently selected text and positions the caret to the removed range begin. If there is no selection, this method does nothing and returns false. |
| SelectAll | Selects the entire text of the text box |
| SelectRange | Selects the text from the char at index start to the char at index end (i.e. the text in the [start;end] range. |
| SetCaretPos | Overloaded. Sets the caret position. Resets the selection. Updates the caret XGuideCaretPos position. |
| TryGetSelectedRange | Tries to get the selected text of the text. The returned 1D range is valid only when this method returns true. |
| TryGetSelectedText | Tries to get the selected text of the text box. The returned text string is valid only when this method returns true. |
| Undo | Undos the last user operation |
| VisitChildDisplaySubtree | Overridden. Called to propagate the display traversal to the specified child node. This implementation directly calls the VisitDisplaySubtree method of the child node. |
Top
Public Events
| Name | Description |
| TextChanged | Occurs when the text property has changed. |
Top
See Also