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

# TCustomGrid.DefaultTextStyle

Default style used to display text including alignment, layout, wrapping, et. al.

## Declaration

Source position: grids.pas line 1241

`protected property TCustomGrid.DefaultTextStyle : TTextStyle read FDefaultTextStyle write FDefaultTextStyle;`

## Description

DefaultTextStyle is a TTextStyle property with the default settings used for text displayed on the grid control. It includes settings like:

- Horizontal and vertical alignment.
- Use of line breaks or wrapping.
- Use of clipping for the text rectangle.
- Converting Tab characters to spaces.
- Display of Accelerator or shortcut prefixes.
- Opacity for the background color and text.
- Use of the system font.
- Right-to-left alignment.
- Text shortening using an Ellipsis character.

DefaultTextStyle is used in the PrepareCanvas method. It is merged with state, color, and options in the control and assigned to the TextStyle property in Canvas.

## See also

TCustomGrid.PrepareCanvas |  | Prepares the canvas for drawing the cell at the specified location.
TCustomGrid.DoPrepareCanvas |  | Performs actions needed to prepare the canvas for a drawing operation.
TCustomGrid.OnPrepareCanvas |  | Event handler signalled to prepare the Canvas to draw the grid.
TTextStyle |  | The Style of the Text to be drawn in a rectangle.
TCustomControl.Canvas |  | The drawing surface for the control.