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

# TCanvas.TextRect

Writes Text string within a specified rectangle, according to predefined Style

## Declaration

Source position: line 0

`public procedure TCanvas.TextRect(`
`const ARect: TRect;`
`X: Integer;`
`Y: Integer;`
`const Text: String`
`); procedure TCanvas.TextRect(`
`ARect: TRect;`
`X: Integer;`
`Y: Integer;`
`const Text: String;`
`const Style: TTextStyle`
`); virtual;`

## Description

Writes Text string within a specified rectangle, according to predefined Style
The boundaries of the rectangle are specified in ARect
X, Y specify the starting point for writing the Text within the rectangle
TextStyle determines whether the text is justified, centered, word-wrapped etc. If the Style argument is omitted, defaults are assumed

The latest version of this document can be found at lazarus-ccr.sourceforge.net.