Gets a particular character from the collection specified through a certain geometrical position.

GetItem(System.Drawing.Point, Bool)

public TextChar GetItem(System.Drawing.Point location, bool getNearest);
Public Function GetItem(ByVal location As System.Drawing.Point, ByVal getNearest As Boolean) As TextChar

Parameters

Parameter Description
location Specifies the character's location. The point must be specified in pixels with an origin at the top left corner of the control.
getNearest Specifies whether the nearest character is returned. If this parameter is set to true, the nearest character is returned. Otherwise, if set to false, a character is only returned, if the specified location is inside the bounding rectangle of an existing character.

Return Value

The return value is null, if a character could not be found. Otherwise, it is an object of the type TextChar.