Docs: LCL/stdctrls. Updates TextHint topics in TCustomComboBox and TCustomEdit.

This commit is contained in:
dsiders 2022-12-06 06:01:40 +00:00
parent ac088cfc61
commit 901b01e602

View File

@ -4147,21 +4147,47 @@ other platforms / widgetsets.
<element name="TCustomComboBox.TextHint"> <element name="TCustomComboBox.TextHint">
<short> <short>
Default hint text shown when the Text property is empty and the control is Default hint text shown when the Text property is empty for the control.
not focused.
</short> </short>
<descr> <descr>
<p> <p>
<var>TextHint</var> is a <var>TTranslateString</var> property which contains <var>TextHint</var> is a <var>TTranslateString</var> property which contains
the inline hint text displayed for the control. TextHint is displayed in the the inline hint text displayed for the control. It is displayed in the
editable area for the control when <var>Text</var> is an empty string editable area for the <var>TCustomComboBox</var> when the Text property is
(<b>''</b>) and the control is not focused. As a TTranslateString value, it empty. Some platforms may refer to this feature as a "placeholder" or "editing
can be translated using the LCL localization mechanism when enabled for the hint". As a TTranslateString value, it can be translated using the LCL
project. localization mechanism when enabled for the project.
</p>
<p>
The value in TextHint is normally displayed using the color in clGrayText.
</p>
<p>
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.
</p>
<p>
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.
</p>
<p>
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.
</p>
<p>
TextHint is different than Hint, which displays a balloon tip when ShowHint is
set to <b>True</b> and the mouse is over the control.
</p> </p>
</descr> </descr>
<seealso> <seealso>
<link id="TCustomComboBox.Text"/> <link id="TCustomComboBox.Text"/>
<link id="TCustomComboBox.CanShowEmulatedTextHint"/>
<link id="#lcl.controls.TControl.Hint">TControl.Hint</link>
<link id="#lcl.controls.TControl.ShowHint">TControl.ShowHint</link>
</seealso> </seealso>
</element> </element>
@ -8294,23 +8320,44 @@ the control.
<element name="TCustomEdit.TextHint"> <element name="TCustomEdit.TextHint">
<short> <short>
Default hint text shown when the Text property is empty and the control is Default hint text shown when the Text property is empty for the control.
not focused.
</short> </short>
<descr> <descr>
<p> <p>
<var>TextHint</var> fills the <var>TCustomEdit</var> with the value in the <var>TextHint</var> is a <var>TTranslateString</var> property which contains
property when the Text in the control is empty and the control does not have the inline hint text displayed for the control. It is displayed in the
focus. This is different than Hint, which displays a balloon tip when editable area for the <var>TCustomEdit</var> when the Text property is empty.
ShowHint is set to <b>True</b> and the mouse is over the control. 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.
</p>
<p>
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.
</p> </p>
<p> <p>
Setting a new value in TextHint causes the widgetset class to be notified, 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 and the value is displayed in the edit control when allowed. If the new
is an empty string (''), the text hint is removed from the control. property value is an empty string (''), the text hint is removed from the
control.
</p>
<p>
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.
</p>
<p>
TextHint is different than Hint, which displays a balloon tip when ShowHint is
set to <b>True</b> and the mouse is over the control.
</p> </p>
</descr> </descr>
<seealso/> <seealso>
<link id="TCustomEdit.Text"/>
<link id="TCustomEdit.CanShowEmulatedTextHint"/>
<link id="#lcl.controls.TControl.Hint">TControl.Hint</link>
<link id="#lcl.controls.TControl.ShowHint">TControl.ShowHint</link>
</seealso>
</element> </element>
<element name="TMemoScrollbar"> <element name="TMemoScrollbar">