Show: Delphi C++
Display Preferences

FMX.Graphics.TCanvas.TextWidth

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function TextWidth(const AText: string): Single;

C++

float __fastcall TextWidth(const System::UnicodeString AText);

Properties

Type Visibility Source Unit Parent
function public
FMX.Graphics.pas
FMX.Graphics.hpp
FMX.Graphics TCanvas

Description

Returns the width, in pixels, of a string rendered in the current font.

Use TextWidth to determine the amount of horizontal space required to display the text on the TCanvas. The returned TextWidth includes the normal leading space in front and after the text TCanvas. Other elements in the TCanvas, such as lines, boxes, or additional lines of text, can be positioned to accommodate the width of the text.

See Also

Personal tools
In Other Languages
Previous Versions
Assistance