Docs: LCL/forms. Updates content in THintWindow.ActivateHint and THintWindow.CalcHintRect topics.

* Related to (but not dependent on) changes in aeca9749.
* Originally reported in issue #41194.
This commit is contained in:
dsiders 2024-11-12 17:20:15 +00:00
parent aeca9749b1
commit c02978f20f

View File

@ -218,7 +218,6 @@ option.
</short>
</element>
<!-- Modified in 43d7f203. -->
<element name="TCloseAction">
<short>
Represents actions that can occur when a form is closed.
@ -249,7 +248,6 @@ Uncomment when the topic exists in RTL documentation.
<short>The form is minimized.</short>
</element>
<!-- Added in 43d7f203. -->
<element name="caNone">
<short>
Represents the caNone enumeration value in TCloseAction.
@ -10088,20 +10086,50 @@ initial bounds for the hint window.
</element>
<element name="THintWindow.ActivateHint">
<short>Shows the specified hint.</short>
<short>
Shows the hint window with the specified hint text.
</short>
<descr>
<p>
<var>ActivateHint</var> is an overloaded procedure used to display the Hint
text specified in <var>AHint</var>. An overloaded variant allows the display
area for the hint window to be specified in the <var>ARect</var> argument.
<var>ActivateHint</var> is an overloaded procedure used to position and display
the Hint text specified in <var>AHint</var> in a pop-up window. An overloaded
variant allows the display area for the hint window to be specified in the
<var>ARect</var> argument.
</p>
<p>
ActivateHint ensures that the display rectangle for the hint window fits within
the work area for the monitor where the hint window is displayed. Values in
HintRect are adjusted as needed to position the window before being applied to
the bounds for the hint window when the window becomes visible.
</p>
<remark>
No actions are performed in the method if <var>ActivateHint</var> has been
previously called with the same hint text and display area.
previously called with the same hint text and display rectangle.
</remark>
<p>
ActivateHint is used in the implementation of methods like ActivateWithBounds
and ActivateHintData.
</p>
<p>
Use CalcHintRect to get the display rectangle for a hint window with a
specified width, hint text, or other associated hint data.
</p>
<p>
For example:
</p>
<code>
HintWindow := THintWindow.Create(nil);
Rect := HintWindow.CalcHintRect(0,'This is the hint', Nil);
HintWindow.ActivateHint(Rect,'This is the hint');
</code>
</descr>
<seealso>
<link id="THintWindow.ActivateWithBounds"/>
<link id="THintWindow.ActivateHintData"/>
<link id="THintWindow.ActivateSub"/>
<link id="THintWindow.CalcHintRect"/>
<link id="THintWindow.HintRect"/>
<link id="THintWindow.SetBounds"/>
</seealso>
</element>
<element name="THintWindow.ActivateHint.AHint">
@ -10174,6 +10202,14 @@ CalcHintRect determines the display rectangle required for the hint display.
CalcHintRect uses the larger of the values in the length of the hint text,
and the width of the hint window.
</p>
<p>
For example:
</p>
<code>
HintWindow := THintWindow.Create(nil);
Rect := HintWindow.CalcHintRect(0,'This is the hint', Nil);
HintWindow.ActivateHint(Rect,'This is the hint');
</code>
</descr>
<seealso/>
</element>