Table of Contents

Method PositionCursor

Namespace
Terminal.Gui
Assembly
Terminal.Gui.dll

PositionCursor()

Positions the cursor in the right position based on the currently focused view in the chain.

public virtual Point? PositionCursor()

Returns

Point?

Viewport-relative cursor position. Return null to ensure the cursor is not visible.

Remarks

Views that are focusable should override PositionCursor() to make sure that the cursor is placed in a location that makes sense. Some terminals do not have a way of hiding the cursor, so it can be distracting to have the cursor left at the last focused view. So views should make sure that they place the cursor in a visually sensible place. The default implementation of PositionCursor() will place the cursor at either the hotkey (if defined) or 0,0.