Table of Contents

Method ScreenToCell

Namespace
Terminal.Gui
Assembly
Terminal.Gui.dll

ScreenToCell(int, int)

. Returns the column and row of Table that corresponds to a given point on the screen (relative to the control client area). Returns null if the point is in the header, no table is loaded or outside the control bounds.

public Point? ScreenToCell(int clientX, int clientY)

Parameters

clientX int

X offset from the top left of the control.

clientY int

Y offset from the top left of the control.

Returns

Point?

Cell clicked or null.

ScreenToCell(int, int, out DataColumn)

. Returns the column and row of Table that corresponds to a given point on the screen (relative to the control client area). Returns null if the point is in the header, no table is loaded or outside the control bounds.

public Point? ScreenToCell(int clientX, int clientY, out DataColumn headerIfAny)

Parameters

clientX int

X offset from the top left of the control.

clientY int

Y offset from the top left of the control.

headerIfAny DataColumn

If the click is in a header this is the column clicked.

Returns

Point?

Cell clicked or null.