Table of Contents

Property InsertionPoint

Namespace
Terminal.Gui.Views
Assembly
Terminal.Gui.dll

InsertionPoint

Gets or sets the cursor position within the date field, constrained to valid digit positions.

public override int InsertionPoint { get; set; }

Property Value

int

The cursor position, clamped to the range [1, FormatLength]. Unlike InsertionPoint, position 0 is not accessible because it contains a leading space.

Remarks

This override constrains the cursor to valid editing positions within the date format:

  • Minimum position is 1 (first digit of the date)
  • Maximum position is FormatLength (last digit of the year)

Note: This property only enforces bounds; it does not skip separator characters. Use Terminal.Gui.Views.DateField.AdjustInsertionPoint(System.Int32,System.Boolean) after setting to ensure the cursor is on a digit position.

See Also
Terminal.Gui.Views.DateField.AdjustInsertionPoint(System.Int32,System.Boolean)