[Overview][Constants][Types][Classes][Procedures and functions][Index] | Reference for unit 'db' (#fcl)

# TField.OnGetText

Event to format the field's content

## Declaration

Source position: db.pas line 439

`published property TField.OnGetText: TFieldGetTextEvent read FOnGetText write FOnGetText;`

## Description

OnGetText is triggered whenever the TField.Text or TField.DisplayText properties are read. It can be used to return a custom formatted string in the AText parameter which will then typically be used by a control to display the field's contents to the user. It is not allowed to change the state of the dataset or the contents of the field during the execution of this event handler.

## See also

TField.Text |  | Text representation of the field
TField.DisplayText |  | Formatted field value
TField.OnSetText |  | Event to set the field's content based on a user-formatted string
TFieldGetTextEvent |  | Event handler to get field content

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