[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Graphics' (#lcl)

TCanvas.TextWidth

Gets the width for the specified text using the canvas Font.

Declaration

Source position: graphics.pp line 1155

public function TCanvas.TextWidth(

  const Text: string

):Integer; virtual;

Arguments

Text

  

Text measured in the method.

Function result

Width for the specified text (in pixels).

Description

Calls TextExtent to get the TSize instance with the return value for the method.


Version 4.0 Generated 2025-05-03 Home