Search Results for

    Show / Hide Table of Contents

    Class TextRegexProvider

    Regex Provider for TextValidateField.
    Inheritance
    object
    TextRegexProvider
    Implements
    ITextValidateProvider
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Terminal.Gui.TextValidateProviders
    Assembly: Terminal.Gui.dll
    Syntax
    public class TextRegexProvider : ITextValidateProvider

    Constructors

    | Edit this page View Source

    TextRegexProvider(string)

    Empty Constructor.
    Declaration
    public TextRegexProvider(string pattern)
    Parameters
    Type Name Description
    string pattern

    Properties

    | Edit this page View Source

    DisplayText

    Gets the formatted string for display.
    Declaration
    public ustring DisplayText { get; }
    Property Value
    Type Description
    ustring
    | Edit this page View Source

    Fixed

    Set that this provider uses a fixed width. e.g. Masked ones are fixed.
    Declaration
    public bool Fixed { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    IsValid

    True if the input is valid, otherwise false.
    Declaration
    public bool IsValid { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    Pattern

    Regex pattern property.
    Declaration
    public ustring Pattern { get; set; }
    Property Value
    Type Description
    ustring
    | Edit this page View Source

    Text

    Set the input text and get the current value.
    Declaration
    public ustring Text { get; set; }
    Property Value
    Type Description
    ustring
    | Edit this page View Source

    ValidateOnInput

    When true, validates with the regex pattern on each input, preventing the input if it's not valid.
    Declaration
    public bool ValidateOnInput { get; set; }
    Property Value
    Type Description
    bool

    Methods

    | Edit this page View Source

    Cursor(int)

    Set Cursor position to pos.
    Declaration
    public int Cursor(int pos)
    Parameters
    Type Name Description
    int pos
    Returns
    Type Description
    int Return first valid position.
    | Edit this page View Source

    CursorEnd()

    Find the last valid character position.
    Declaration
    public int CursorEnd()
    Returns
    Type Description
    int New cursor position.
    | Edit this page View Source

    CursorLeft(int)

    First valid position before pos.
    Declaration
    public int CursorLeft(int pos)
    Parameters
    Type Name Description
    int pos
    Returns
    Type Description
    int New cursor position if any, otherwise returns pos
    | Edit this page View Source

    CursorRight(int)

    First valid position after pos.
    Declaration
    public int CursorRight(int pos)
    Parameters
    Type Name Description
    int pos Current position.
    Returns
    Type Description
    int New cursor position if any, otherwise returns pos
    | Edit this page View Source

    CursorStart()

    Find the first valid character position.
    Declaration
    public int CursorStart()
    Returns
    Type Description
    int New cursor position.
    | Edit this page View Source

    Delete(int)

    Deletes the current character in pos.
    Declaration
    public bool Delete(int pos)
    Parameters
    Type Name Description
    int pos
    Returns
    Type Description
    bool true if the character was successfully removed, otherwise false.
    | Edit this page View Source

    InsertAt(char, int)

    Insert character ch in position pos.
    Declaration
    public bool InsertAt(char ch, int pos)
    Parameters
    Type Name Description
    char ch
    int pos
    Returns
    Type Description
    bool true if the character was successfully inserted, otherwise false.

    Implements

    ITextValidateProvider
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX