From 901b01e6023b72062d3559f1e388548be50492b3 Mon Sep 17 00:00:00 2001 From: dsiders Date: Tue, 6 Dec 2022 06:01:40 +0000 Subject: [PATCH] Docs: LCL/stdctrls. Updates TextHint topics in TCustomComboBox and TCustomEdit. --- docs/xml/lcl/stdctrls.xml | 79 +++++++++++++++++++++++++++++++-------- 1 file changed, 63 insertions(+), 16 deletions(-) diff --git a/docs/xml/lcl/stdctrls.xml b/docs/xml/lcl/stdctrls.xml index ebc9b9843b..5381e37798 100644 --- a/docs/xml/lcl/stdctrls.xml +++ b/docs/xml/lcl/stdctrls.xml @@ -4147,21 +4147,47 @@ other platforms / widgetsets. -Default hint text shown when the Text property is empty and the control is -not focused. +Default hint text shown when the Text property is empty for the control.

TextHint is a TTranslateString property which contains -the inline hint text displayed for the control. TextHint is displayed in the -editable area for the control when Text is an empty string -('') and the control is not focused. As a TTranslateString value, it -can be translated using the LCL localization mechanism when enabled for the -project. +the inline hint text displayed for the control. It is displayed in the +editable area for the TCustomComboBox when the Text property is +empty. Some platforms may refer to this feature as a "placeholder" or "editing +hint". As a TTranslateString value, it can be translated using the LCL +localization mechanism when enabled for the project. +

+

+The value in TextHint is normally displayed using the color in clGrayText. +

+

+The display behavior for TextHint is platform-specific. On some platforms, the +text hint is displayed any time the value in Text is empty. For others, it is +displayed only when the control does not have focus. +

+

+Setting a new value in TextHint causes the widgetset class to be notified, +and the value is displayed in the edit control when allowed. If the new +property value is an empty string (''), the text hint is removed from the +control. +

+

+For platforms that do not provide native support for TextHint, an emulated +text hint is displayed. This is a TCustomEdit control created to enable the +feature, and can be displayed only when the original control does not have +focus. +

+

+TextHint is different than Hint, which displays a balloon tip when ShowHint is +set to True and the mouse is over the control.

+ +TControl.Hint +TControl.ShowHint
@@ -8294,23 +8320,44 @@ the control. -Default hint text shown when the Text property is empty and the control is -not focused. +Default hint text shown when the Text property is empty for the control.

-TextHint fills the TCustomEdit with the value in the -property when the Text in the control is empty and the control does not have -focus. This is different than Hint, which displays a balloon tip when -ShowHint is set to True and the mouse is over the control. +TextHint is a TTranslateString property which contains +the inline hint text displayed for the control. It is displayed in the +editable area for the TCustomEdit when the Text property is empty. +Some platforms may refer to this feature as a "placeholder" or "editing hint". +The value in TextHint is normally displayed using the color in clGrayText. +

+

+The display behavior for TextHint is platform-specific. On some platforms, the +text hint is displayed any time the value in Text is empty. For others, it is +displayed only when the control does not have focus.

Setting a new value in TextHint causes the widgetset class to be notified, -and the value is displayed in the edit control when allowed. If the new value -is an empty string (''), the text hint is removed from the control. +and the value is displayed in the edit control when allowed. If the new +property value is an empty string (''), the text hint is removed from the +control. +

+

+For platforms that do not provide native support for TextHint, an emulated +text hint is displayed. This is a TCustomEdit control created to enable the +feature, and can be displayed only when the original control does not have +focus. +

+

+TextHint is different than Hint, which displays a balloon tip when ShowHint is +set to True and the mouse is over the control.

- + + + +TControl.Hint +TControl.ShowHint +