LCL: implemented THintInfo.ReshowTimeout, issue #27496

git-svn-id: trunk@47918 -
This commit is contained in:
mattias 2015-02-20 15:47:36 +00:00
parent 76f8ed6f80
commit a6d416e72e
3 changed files with 10 additions and 5 deletions

View File

@ -13426,8 +13426,8 @@ While CanFocus checks all control parents it does not check whether a form contr
</element>
<!-- variable Visibility: default -->
<element name="THintInfo.ReshowTimeout">
<short/>
<descr/>
<short>If set to a value &gt;0 call after value milliseconds OnShowHint again</short>
<descr>Use this update the hint text while it is showing.</descr>
<seealso/>
</element>
<!-- variable Visibility: default -->

View File

@ -213,7 +213,7 @@ begin
//if a hint is visible immediately query the app to show a new hint...
if FHintTimerType = ahttHideHint then
ShowHintWindow(Info);
//...if there's no hint window visible at this point than schedule a new query
//...if there's no hint window visible at this point then schedule a new query
if (FHintTimerType = ahttNone) or (FHintWindow = nil) or not FHintWindow.Visible then
StartHintTimer(HintPause, ahttShowHint);
end;
@ -864,7 +864,10 @@ begin
FHintWindow.ActivateHint(HintWinRect, HintInfo.HintStr);
FHintRect := HintInfo.CursorRect;
// start hide timer
StartHintTimer(HintInfo.HideTimeout,ahttHideHint);
if HintInfo.ReshowTimeout>0 then
StartHintTimer(HintInfo.ReshowTimeout,ahttReshowHint)
else
StartHintTimer(HintInfo.HideTimeout,ahttHideHint);
end
else
HideHint;
@ -912,7 +915,7 @@ begin
{$endif}
StopHintTimer;
case FHintTimerType of
ahttShowHint:
ahttShowHint,ahttReshowHint:
begin
if not GetCursorPos(CursorPos) then
HideHint

View File

@ -220,6 +220,8 @@ begin
FActivating := True;
try
Assert(ControlCount = 0, 'THintWindow.ActivateRendered: ControlCount > 0');
if Caption<>AHint then
Invalidate;
Caption := AHint;
ActivateSub(Visible and (Caption <> AHint));
finally