Search Results for

    Show / Hide Table of Contents

    Class TimeField

    Time editing View
    Inheritance
    System.Object
    Responder
    View
    TextField
    TimeField
    Implements
    System.IDisposable
    System.ComponentModel.ISupportInitializeNotification
    System.ComponentModel.ISupportInitialize
    Remarks
    The TimeField View provides time editing functionality with mouse support.
    Inherited Members
    TextField.OnLeave(View)
    TextField.PositionCursor()
    TextField.Redraw(Rect)
    TextField.KillWordBackwards()
    TextField.KillWordForwards()
    TextField.SelectAll()
    TextField.DeleteAll()
    TextField.ClearAllSelection()
    TextField.Copy()
    TextField.Cut()
    TextField.Paste()
    TextField.OnTextChanging(ustring)
    TextField.OnEnter(View)
    TextField.InsertText(String, Boolean)
    TextField.ClearHistoryChanges()
    TextField.Used
    TextField.ReadOnly
    TextField.Autocomplete
    TextField.Frame
    TextField.Text
    TextField.Secret
    TextField.ScrollOffset
    TextField.IsDirty
    TextField.HasHistoryChanges
    TextField.ContextMenu
    TextField.CanFocus
    TextField.SelectedStart
    TextField.SelectedLength
    TextField.SelectedText
    TextField.DesiredCursorVisibility
    TextField.TextChanging
    TextField.TextChanged
    View.GetMinWidthHeight(Size)
    View.SetMinWidthHeight()
    View.UpdateTextFormatterText()
    View.ProcessResizeView()
    View.SetNeedsDisplay()
    View.ClearLayoutNeeded()
    View.SetNeedsDisplay(Rect)
    View.SetChildNeedsDisplay()
    View.Add(View)
    View.Add(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(Int32, Int32)
    View.ClipToBounds()
    View.SetClip(Rect)
    View.DrawFrame(Rect, Int32, Boolean)
    View.DrawHotString(ustring, Attribute, Attribute)
    View.DrawHotString(ustring, Boolean, ColorScheme)
    View.Move(Int32, Int32, Boolean)
    View.OnAdded(View)
    View.OnRemoved(View)
    View.AddRune(Int32, Int32, Rune)
    View.ClearNeedsDisplay()
    View.OnDrawContent(Rect)
    View.OnDrawContentComplete(Rect)
    View.SetFocus()
    View.InvokeKeybindings(KeyEvent)
    View.AddKeyBinding(Key, Command)
    View.ReplaceKeyBinding(Key, Key)
    View.ContainsKeyBinding(Key)
    View.ClearKeybindings()
    View.ClearKeybinding(Key)
    View.ClearKeybinding(Command)
    View.AddCommand(Command, Func<Nullable<Boolean>>)
    View.GetSupportedCommands()
    View.GetKeyFromCommand(Command)
    View.ProcessHotKey(KeyEvent)
    View.ProcessColdKey(KeyEvent)
    View.OnKeyDown(KeyEvent)
    View.OnKeyUp(KeyEvent)
    View.EnsureFocus()
    View.FocusFirst()
    View.FocusLast()
    View.FocusPrev()
    View.FocusNext()
    View.LayoutSubviews()
    View.ToString()
    View.GetAutoSize()
    View.GetHotKeySpecifierLength(Boolean)
    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(Boolean)
    View.BeginInit()
    View.EndInit()
    View.SetWidth(Int32, Int32)
    View.SetHeight(Int32, Int32)
    View.GetCurrentWidth(Int32)
    View.GetCurrentHeight(Int32)
    View.GetNormalColor()
    View.GetTopSuperView()
    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.TextFormatter
    View.SuperView
    View.HasFocus
    View.Focused
    View.MostFocused
    View.ColorScheme
    View.AutoSize
    View.PreserveTrailingSpaces
    View.TextAlignment
    View.VerticalTextAlignment
    View.TextDirection
    View.IsInitialized
    View.IsAdded
    View.Enabled
    View.Visible
    View.Border
    View.Added
    View.Removed
    View.Enter
    View.Leave
    View.MouseEnter
    View.MouseLeave
    View.MouseClick
    View.CanFocusChanged
    View.EnabledChanged
    View.VisibleChanged
    View.HotKeyChanged
    View.DrawContent
    View.DrawContentComplete
    View.KeyPress
    View.KeyDown
    View.KeyUp
    View.LayoutStarted
    View.LayoutComplete
    View.Initialized
    Responder.Dispose()
    Namespace: Terminal.Gui
    Assembly: Terminal.Gui.dll
    Syntax
    public class TimeField : TextField

    Constructors

    TimeField()

    Initializes a new instance of TimeField using Computed positioning.
    Declaration
    public TimeField()

    TimeField(Int32, Int32, TimeSpan, Boolean)

    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
    System.Int32 x The x coordinate.
    System.Int32 y The y coordinate.
    System.TimeSpan time Initial time.
    System.Boolean isShort If true, the seconds are hidden. Sets the IsShortFormat property.

    TimeField(TimeSpan)

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

    Properties

    CursorPosition

    Sets or gets the current cursor position.
    Declaration
    public override int CursorPosition { get; set; }
    Property Value
    Type Description
    System.Int32
    Overrides
    TextField.CursorPosition

    IsShortFormat

    Get or sets whether TimeField uses the short or long time format.
    Declaration
    public bool IsShortFormat { get; set; }
    Property Value
    Type Description
    System.Boolean

    Time

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

    Methods

    DeleteCharLeft(Boolean)

    Deletes the left character.
    Declaration
    public override void DeleteCharLeft(bool useOldCursorPos = true)
    Parameters
    Type Name Description
    System.Boolean useOldCursorPos
    Overrides
    TextField.DeleteCharLeft(Boolean)

    DeleteCharRight()

    Deletes the right character.
    Declaration
    public override void DeleteCharRight()
    Overrides
    TextField.DeleteCharRight()

    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
    System.Boolean true, if the event was handled, false otherwise.
    Overrides
    TextField.MouseEvent(MouseEvent)

    OnTimeChanged(DateTimeEventArgs<TimeSpan>)

    Event firing method that invokes the TimeChanged event.
    Declaration
    public virtual void OnTimeChanged(DateTimeEventArgs<TimeSpan> args)
    Parameters
    Type Name Description
    DateTimeEventArgs<System.TimeSpan> args The event arguments

    ProcessKey(KeyEvent)

    Processes key presses for the TextField.
    Declaration
    public override bool ProcessKey(KeyEvent kb)
    Parameters
    Type Name Description
    KeyEvent kb
    Returns
    Type Description
    System.Boolean
    Overrides
    TextField.ProcessKey(KeyEvent)

    Events

    TimeChanged

    TimeChanged event, raised when the Date has changed.
    Declaration
    public event Action<DateTimeEventArgs<TimeSpan>> TimeChanged
    Event Type
    Type Description
    System.Action<DateTimeEventArgs<System.TimeSpan>>

    Implements

    System.IDisposable
    System.ComponentModel.ISupportInitializeNotification
    System.ComponentModel.ISupportInitialize
    In This Article
    Back to top Generated by DocFX