Search Results for

    Show / Hide Table of Contents

    Class TimeField

    Time editing View
    Inheritance
    object
    Responder
    View
    TextField
    TimeField
    Implements
    IDisposable
    ISupportInitializeNotification
    ISupportInitialize
    Inherited Members
    TextField.Used
    TextField.ReadOnly
    TextField.TextChanging
    TextField.TextChanged
    TextField.OnLeave(View)
    TextField.Autocomplete
    TextField.Frame
    TextField.Text
    TextField.Secret
    TextField.ScrollOffset
    TextField.IsDirty
    TextField.HasHistoryChanges
    TextField.ContextMenu
    TextField.PositionCursor()
    TextField.Redraw(Rect)
    TextField.GetNormalColor()
    TextField.CanFocus
    TextField.KillWordBackwards()
    TextField.KillWordForwards()
    TextField.SelectAll()
    TextField.DeleteAll()
    TextField.SelectedStart
    TextField.SelectedLength
    TextField.SelectedText
    TextField.ClearAllSelection()
    TextField.Copy()
    TextField.Cut()
    TextField.Paste()
    TextField.OnTextChanging(ustring)
    TextField.DesiredCursorVisibility
    TextField.OnEnter(View)
    TextField.InsertText(string, bool)
    TextField.ClearHistoryChanges()
    View.Added
    View.Removed
    View.Enter
    View.Leave
    View.MouseEnter
    View.MouseLeave
    View.MouseClick
    View.CanFocusChanged
    View.EnabledChanged
    View.VisibleChanged
    View.HotKeyChanged
    View.HotKey
    View.HotKeySpecifier
    View.Shortcut
    View.ShortcutTag
    View.ShortcutAction
    View.Data
    View.Driver
    View.Subviews
    View.TabIndexes
    View.TabIndex
    View.TabStop
    View.Id
    View.IsCurrentTop
    View.WantMousePositionReports
    View.WantContinuousButtonPressed
    View.LayoutStyle
    View.Bounds
    View.X
    View.Y
    View.Width
    View.Height
    View.ForceValidatePosDim
    View.GetMinWidthHeight(out Size)
    View.SetMinWidthHeight()
    View.TextFormatter
    View.SuperView
    View.UpdateTextFormatterText()
    View.ProcessResizeView()
    View.SetNeedsDisplay()
    View.ClearLayoutNeeded()
    View.SetNeedsDisplay(Rect)
    View.SetChildNeedsDisplay()
    View.Add(View)
    View.Add(params View[])
    View.RemoveAll()
    View.Remove(View)
    View.BringSubviewToFront(View)
    View.SendSubviewToBack(View)
    View.SendSubviewBackwards(View)
    View.BringSubviewForward(View)
    View.Clear()
    View.Clear(Rect)
    View.ScreenToView(int, int)
    View.ClipToBounds()
    View.SetClip(Rect)
    View.DrawFrame(Rect, int, bool)
    View.DrawHotString(ustring, Attribute, Attribute)
    View.DrawHotString(ustring, bool, ColorScheme)
    View.Move(int, int, bool)
    View.HasFocus
    View.OnAdded(View)
    View.OnRemoved(View)
    View.Focused
    View.MostFocused
    View.ColorScheme
    View.AddRune(int, int, Rune)
    View.ClearNeedsDisplay()
    View.DrawContent
    View.OnDrawContent(Rect)
    View.DrawContentComplete
    View.OnDrawContentComplete(Rect)
    View.SetFocus()
    View.KeyPress
    View.InvokeKeybindings(KeyEvent)
    View.AddKeyBinding(Key, params Command[])
    View.ReplaceKeyBinding(Key, Key)
    View.ContainsKeyBinding(Key)
    View.ClearKeybindings()
    View.ClearKeybinding(Key)
    View.ClearKeybinding(params Command[])
    View.AddCommand(Command, Func<bool?>)
    View.GetSupportedCommands()
    View.GetKeyFromCommand(params Command[])
    View.ProcessHotKey(KeyEvent)
    View.ProcessColdKey(KeyEvent)
    View.KeyDown
    View.OnKeyDown(KeyEvent)
    View.KeyUp
    View.OnKeyUp(KeyEvent)
    View.EnsureFocus()
    View.FocusFirst()
    View.FocusLast()
    View.FocusPrev()
    View.FocusNext()
    View.LayoutStarted
    View.LayoutComplete
    View.Initialized
    View.LayoutSubviews()
    View.AutoSize
    View.PreserveTrailingSpaces
    View.TextAlignment
    View.VerticalTextAlignment
    View.TextDirection
    View.IsInitialized
    View.IsAdded
    View.Enabled
    View.ClearOnVisibleFalse
    View.Visible
    View.Border
    View.IgnoreBorderPropertyOnRedraw
    View.ToString()
    View.GetAutoSize()
    View.GetHotKeySpecifierLength(bool)
    View.GetTextFormatterBoundsSize()
    View.GetBoundsTextFormatterSize()
    View.OnMouseEnter(MouseEvent)
    View.OnMouseLeave(MouseEvent)
    View.OnMouseEvent(MouseEvent)
    View.OnMouseClick(View.MouseEventArgs)
    View.OnCanFocusChanged()
    View.OnEnabledChanged()
    View.OnVisibleChanged()
    View.Dispose(bool)
    View.BeginInit()
    View.EndInit()
    View.SetWidth(int, out int)
    View.SetHeight(int, out int)
    View.GetCurrentWidth(out int)
    View.GetCurrentHeight(out int)
    View.GetFocusColor()
    View.GetHotNormalColor()
    View.GetTopSuperView()
    Responder.Dispose()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Terminal.Gui
    Assembly: Terminal.Gui.dll
    Syntax
    public class TimeField : TextField, IDisposable, ISupportInitializeNotification, ISupportInitialize
    Remarks
    The TimeField View provides time editing functionality with mouse support.

    Constructors

    | Edit this page View Source

    TimeField()

    Initializes a new instance of TimeField using Computed positioning.
    Declaration
    public TimeField()
    | Edit this page View Source

    TimeField(int, int, TimeSpan, bool)

    Initializes a new instance of TimeField using Absolute positioning.
    Declaration
    public TimeField(int x, int y, TimeSpan time, bool isShort = false)
    Parameters
    Type Name Description
    int x The x coordinate.
    int y The y coordinate.
    TimeSpan time Initial time.
    bool isShort If true, the seconds are hidden. Sets the IsShortFormat property.
    | Edit this page View Source

    TimeField(TimeSpan)

    Initializes a new instance of TimeField using Computed positioning.
    Declaration
    public TimeField(TimeSpan time)
    Parameters
    Type Name Description
    TimeSpan time Initial time

    Properties

    | Edit this page View Source

    CursorPosition

    Sets or gets the current cursor position.
    Declaration
    public override int CursorPosition { get; set; }
    Property Value
    Type Description
    int
    Overrides
    TextField.CursorPosition
    | Edit this page View Source

    IsShortFormat

    Get or sets whether TimeField uses the short or long time format.
    Declaration
    public bool IsShortFormat { get; set; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    Time

    Gets or sets the time of the TimeField.
    Declaration
    public TimeSpan Time { get; set; }
    Property Value
    Type Description
    TimeSpan

    Methods

    | Edit this page View Source

    DeleteCharLeft(bool)

    Deletes the left character.
    Declaration
    public override void DeleteCharLeft(bool useOldCursorPos = true)
    Parameters
    Type Name Description
    bool useOldCursorPos
    Overrides
    TextField.DeleteCharLeft(bool)
    | Edit this page View Source

    DeleteCharRight()

    Deletes the right character.
    Declaration
    public override void DeleteCharRight()
    Overrides
    TextField.DeleteCharRight()
    | Edit this page View Source

    MouseEvent(MouseEvent)

    Method invoked when a mouse event is generated
    Declaration
    public override bool MouseEvent(MouseEvent ev)
    Parameters
    Type Name Description
    MouseEvent ev
    Returns
    Type Description
    bool true, if the event was handled, false otherwise.
    Overrides
    TextField.MouseEvent(MouseEvent)
    | Edit this page View Source

    OnTimeChanged(DateTimeEventArgs<TimeSpan>)

    Event firing method that invokes the TimeChanged event.
    Declaration
    public virtual void OnTimeChanged(DateTimeEventArgs<TimeSpan> args)
    Parameters
    Type Name Description
    DateTimeEventArgs<TimeSpan> args The event arguments
    | Edit this page View Source

    ProcessKey(KeyEvent)

    Processes key presses for the TextField.
    Declaration
    public override bool ProcessKey(KeyEvent kb)
    Parameters
    Type Name Description
    KeyEvent kb
    Returns
    Type Description
    bool
    Overrides
    TextField.ProcessKey(KeyEvent)
    Remarks
    The TextField control responds to the following keys:
    KeysFunction
    Delete, BackspaceDeletes the character before cursor.

    Events

    | Edit this page View Source

    TimeChanged

    TimeChanged event, raised when the Date has changed.
    Declaration
    public event Action<DateTimeEventArgs<TimeSpan>> TimeChanged
    Event Type
    Type Description
    Action<DateTimeEventArgs<TimeSpan>>
    Remarks
    This event is raised when the Time changes.

    Implements

    IDisposable
    ISupportInitializeNotification
    ISupportInitialize
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX