Author: Lou Adler
How to change the hint display delay
Answer:
Solve 1:
I usually use a procedure like this, so itīll calculate the needed time to display
any hint:
1 2 procedure TDM.DoShowHint(var HintStr: string; var CanShow: Boolean; var HintInfo:
3 THintInfo);
4 begin5 CanShow := not ExibirHints;
6 {Global variable the user configured to display the hint or not}7 HintInfo.HideTimeout := Length(HintStr) * 50;
8 {Calculate the size of the string to wait a certain time}9 end;
Solve 2:
Put a TApplicationEvents component and play with the OnShowHint event handler:
10 11 procedure TForm1.ApplicationEvents1ShowHint(var HintStr: string; var CanShow:
12 Boolean;
13 var HintInfo: THintInfo);
14 begin15 {Check here the HintInfo class, eg.16 if HintInfo.HintControl = MyControl then17 HintInfo.ReshowTimeout := ...18 HintInfo.HideTimeout := ... }19 end;