Interface ITextValidateProvider
TextValidateField Providers Interface.
All TextValidateField are created with a ITextValidateProvider.
Assembly: Terminal.Gui.dll
Syntax
public interface ITextValidateProvider
Properties
DisplayText
Gets the formatted string for display.
Declaration
ustring DisplayText { get; }
Property Value
Type |
Description |
NStack.ustring |
|
Fixed
Set that this provider uses a fixed width.
e.g. Masked ones are fixed.
Declaration
Property Value
Type |
Description |
System.Boolean |
|
IsValid
True if the input is valid, otherwise false.
Declaration
Property Value
Type |
Description |
System.Boolean |
|
Text
Set the input text and get the current value.
Declaration
ustring Text { get; set; }
Property Value
Type |
Description |
NStack.ustring |
|
Methods
Cursor(Int32)
Set Cursor position to pos
.
Declaration
Parameters
Type |
Name |
Description |
System.Int32 |
pos |
|
Returns
Type |
Description |
System.Int32 |
Return first valid position. |
CursorEnd()
Find the last valid character position.
Declaration
Returns
Type |
Description |
System.Int32 |
New cursor position. |
CursorLeft(Int32)
First valid position before pos
.
Declaration
Parameters
Type |
Name |
Description |
System.Int32 |
pos |
|
Returns
Type |
Description |
System.Int32 |
New cursor position if any, otherwise returns pos |
CursorRight(Int32)
First valid position after pos
.
Declaration
Parameters
Type |
Name |
Description |
System.Int32 |
pos |
Current position. |
Returns
Type |
Description |
System.Int32 |
New cursor position if any, otherwise returns pos |
CursorStart()
Find the first valid character position.
Declaration
Returns
Type |
Description |
System.Int32 |
New cursor position. |
Delete(Int32)
Deletes the current character in pos
.
Declaration
Parameters
Type |
Name |
Description |
System.Int32 |
pos |
|
Returns
Type |
Description |
System.Boolean |
true if the character was successfully removed, otherwise false. |
InsertAt(Char, Int32)
Insert character ch
in position pos
.
Declaration
bool InsertAt(char ch, int pos)
Parameters
Type |
Name |
Description |
System.Char |
ch |
|
System.Int32 |
pos |
|
Returns
Type |
Description |
System.Boolean |
true if the character was successfully inserted, otherwise false. |