Class DateField
Simple Date editing View
Implements
System.IDisposable
System.ComponentModel.ISupportInitializeNotification
System.ComponentModel.ISupportInitialize
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Terminal.Gui
Assembly: Terminal.Gui.dll
Syntax
public class DateField : TextField, IDisposable, ISupportInitializeNotification, ISupportInitialize
Remarks
Constructors
DateField()
Declaration
public DateField()
DateField(DateTime)
Declaration
public DateField(DateTime date)
Parameters
Type | Name | Description |
---|---|---|
System.DateTime | date |
DateField(Int32, Int32, DateTime, Boolean)
Declaration
public DateField(int x, int y, DateTime date, bool isShort = false)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | x | The x coordinate. |
System.Int32 | y | The y coordinate. |
System.DateTime | date | Initial date contents. |
System.Boolean | isShort | If true, shows only two digits for the year. |
Properties
CursorPosition
Declaration
public override int CursorPosition { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Overrides
Date
Gets or sets the date of the DateField.
Declaration
public DateTime Date { get; set; }
Property Value
Type | Description |
---|---|
System.DateTime |
Remarks
IsShortFormat
Get or set the date format for the widget.
Declaration
public bool IsShortFormat { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
DeleteCharLeft(Boolean)
Declaration
public override void DeleteCharLeft(bool useOldCursorPos = true)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | useOldCursorPos |
Overrides
DeleteCharRight()
Declaration
public override void DeleteCharRight()
Overrides
MouseEvent(MouseEvent)
Declaration
public override bool MouseEvent(MouseEvent ev)
Parameters
Type | Name | Description |
---|---|---|
MouseEvent | ev |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
OnDateChanged(DateTimeEventArgs<DateTime>)
Event firing method for the DateChanged event.
Declaration
public virtual void OnDateChanged(DateTimeEventArgs<DateTime> args)
Parameters
Type | Name | Description |
---|---|---|
DateTimeEventArgs<System.DateTime> | args | Event arguments |
ProcessKey(KeyEvent)
Declaration
public override bool ProcessKey(KeyEvent kb)
Parameters
Type | Name | Description |
---|---|---|
KeyEvent | kb |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
Events
DateChanged
DateChanged event, raised when the Date property has changed.
Declaration
public event Action<DateTimeEventArgs<DateTime>> DateChanged
Event Type
Type | Description |
---|---|
System.Action<DateTimeEventArgs<System.DateTime>> |
Remarks
This event is raised when the Date property changes.
Implements
System.IDisposable
System.ComponentModel.ISupportInitializeNotification
System.ComponentModel.ISupportInitialize