![]() Example |
![]() ![]() ![]() |
acAppEvents component.
|
type
|
TShowHintEvent = procedure(var HintStr: String; var CanShow: Boolean; var HintInfo: THintInfo) of object;
|
|
property OnShowHint: TShowHintEvent;
|
The OnShowHint event occurs when the application is about to display the hint window for a Help Hint.
|
|
Write an OnShowHint event handler to change the appearance and behavior of Help Hints.
|
|
The TShowHintEvent is the type of the OnShowHint event. The HintStr parameter sets the text of the Help Hint. To obtain the text of a hint for a particular control, call the GetLongHint or GetShortHint function, assigning the result to HintStr. To change the text, change the value of this string.
|
|
Use the CanShow parameter to permit or prevent the Help Hint from displaying. If CanShow is True, the Help Hint displays. If it is False, the Help Hint does not appear.
|
|
The HintInfo parameter is a record that contains information about the appearance and behavior of the Help window. Change its fields to customize the way the Help Hint is displayed.
|
procedure TForm1.acAppEventsShowHint(var HintStr: String; var CanShow: Boolean; var HintInfo: THintInfo);
|
begin
|
if HintInfo.HintControl = SpeedButton3 then
|
begin
|
with HintInfo do
|
begin
|
HintColor := clAqua; { Changes only for this hint }
|
HintMaxWidth := 120; {Hint text word wraps if width is greater than 120 }
|
Inc(HintPos.X, SpeedButton3.Width); { Move hint to right edge }
|
end;
|
end;
|
end;
|
OnHint property and acFormHints component.
|