Contents

characterIndexForPoint:

Returns the index of the character whose frame rectangle includes the given point.

Declaration

- (NSUInteger) characterIndexForPoint:(NSPoint) point;

Parameters

  • point:

    A point, in screen coordinates.

Return Value

The character index, measured from the start of the receiver’s text storage, of the character containing the given point. Returns NSNotFound if the cursor is not within a character.

See Also

Character coordinates