FMX.TextLayout.TTextLayout.PositionAtPoint

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function PositionAtPoint(const APoint: TPointF; const RoundToWord: Boolean = False): Integer;

C++

int __fastcall PositionAtPoint(const System::Types::TPointF &APoint, const bool RoundToWord = false);

Properties

Type Visibility Source Unit Parent
function public
FMX.TextLayout.pas
FMX.TextLayout.hpp
FMX.TextLayout TTextLayout

Description

Get the position of a specified point within the text.

The PositionAtPoint method can be used to get the position of a character within the text, by its coordinates.

APoint specifies the point for which to get the position.

If APoint is not within the text area, then PositionAtPoint returns -1.

See Also