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

# TCustomEdit.CanShowEmulatedTextHint

Indicates if the value in TextHint can be displayed in the edit control.

## Declaration

Source position: stdctrls.pp line 798

`protected function TCustomEdit.CanShowEmulatedTextHint: Boolean; virtual;`

## Function result

True when the emulated text hint can be displayed.

## Description

CanShowEmulatedTextHint is a Boolean function which indicates if the value in TextHint can be emulated for the edit control. The return value is True when the following conditions are met:

- A handle has been allocated for the control.
- The widgetset class does NOT include the lcTextHint LCL capability flag (the lack of native widgetset support for the feature is why it's being emulated).
- ComponentState indicates that the component is not being loaded using LCL streaming, and is not being edited at design-time.
- TextHint is not an empty string ('').
- Text is an empty string ('').
- The control is not Focused.

CanShowEmulatedTextHint is used in the WMKillFocus method, and when the values in Text or TextHint are applied for the control.

Remark: | In the current LCL implementation, TextHint display is emulated for all widgetsets except Win32/Win64 (since ComCtlVersionIE6) and QT5/QT6.

## See also

TCustomEdit.Text |  | The text displayed and edited for the control.
TCustomEdit.TextHint |  | Default hint text shown when the Text property is empty for the control.
TWinControl.Focused |  | Checks whether the control has focus.
TComponent.ComponentState