View Issue Details

IDProjectCategoryView StatusLast Update
0037053LazarusLCLpublic2020-05-13 10:48
ReporterZaher Dirkey Assigned ToJuha Manninen  
PrioritynormalSeverityminorReproducibilitysometimes
Status closedResolutionfixed 
Summary0037053: HintInfo.ReshowTimeout hide hint but not show it again
DescriptionBug: When set HintInfo.ReshowTimeout and when CanShow = False or HintStr = '' , at same control bounds without moving out, hint never show again.

suggestion to resolve it by adding ahttReshowHint next to ahttShowHint, i tested but not sure about it, it is fast fix.

          if FHintTimerType = ahttHideHint then
            ShowHintWindow(Info);
          //...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;
      ahttShowHint, ahttReshowHint:
        StartHintTimer(HintPause, ahttShowHint);
    end;
  end
  else
    CancelHint;
end;
Steps To ReproduceNew Project, put TPanel on the form, with bound 200, 200 (or bigger), Add TApplicationProperties
In ShowHint of ApplicationProperties

procedure TForm1.ApplicationProperties1ShowHint(var HintStr: string; var CanShow: Boolean; var HintInfo: THintInfo);
begin
  CanShow := (HintInfo.CursorPos.X < 100) and (HintInfo.CursorPos.Y < 100);
  if CanShow then
  begin
    HintInfo.HintStr := IntToStr(HintInfo.CursorPos.X)+','+IntToStr(HintInfo.CursorPos.Y);
    HintInfo.HideTimeout := 10000;
    HintInfo.ReshowTimeout := 200;
  end;
end;

Now move in Panel1, in x,y less than 100, it show hint, stay at Panel1 but move it out of 100,100, hint will hide and never show even back to x,y less than 100, it back to show if u moved out of control and back.
Additional InformationI tested it in Windows8.1
Tagshint, lcl
Fixed in Revisionr63142
LazTarget-
Widgetset
Attached Files

Activities

Juha Manninen

2020-05-12 08:28

developer   ~0122720

Zaher, a demo application and a patch would be nice.

Zaher Dirkey

2020-05-12 17:08

reporter   ~0122733

Demo and Patch attached
hint.zip (2,033 bytes)
ReshowTimeout.patch (514 bytes)   
Index: lcl/include/application.inc
===================================================================
--- lcl/include/application.inc	(revision 63019)
+++ lcl/include/application.inc	(working copy)
@@ -205,7 +205,7 @@
           if (FHintTimerType = ahttNone) or (FHintWindow = nil) or not FHintWindow.Visible then
             StartHintTimer(HintPause, ahttShowHint);
         end;
-      ahttShowHint:
+      ahttShowHint, ahttReshowHint:
         StartHintTimer(HintPause, ahttShowHint);
     end;
   end
ReshowTimeout.patch (514 bytes)   

Zaher Dirkey

2020-05-12 17:09

reporter   ~0122734

Last edited: 2020-05-12 17:10

View 2 revisions

To Test, move mouse over panel1 , keep all movments inside it, move mouse into rect(0,0, 100, 100) it show hint, out of this rect hide hint back to the rect hint never show again until move mouse out of panel1, this patch fixed it.

Juha Manninen

2020-05-12 22:04

developer   ~0122745

Ok, looks good. I applied the patch. Thanks.

Issue History

Date Modified Username Field Change
2020-05-12 03:48 Zaher Dirkey New Issue
2020-05-12 08:28 Juha Manninen Note Added: 0122720
2020-05-12 17:04 Zaher Dirkey Tag Attached: lcl
2020-05-12 17:04 Zaher Dirkey Tag Attached: hint
2020-05-12 17:08 Zaher Dirkey Note Added: 0122733
2020-05-12 17:08 Zaher Dirkey File Added: hint.zip
2020-05-12 17:08 Zaher Dirkey File Added: ReshowTimeout.patch
2020-05-12 17:09 Zaher Dirkey Note Added: 0122734
2020-05-12 17:10 Zaher Dirkey Note Edited: 0122734 View Revisions
2020-05-12 21:59 Juha Manninen Assigned To => Juha Manninen
2020-05-12 21:59 Juha Manninen Status new => assigned
2020-05-12 22:04 Juha Manninen Status assigned => resolved
2020-05-12 22:04 Juha Manninen Resolution open => fixed
2020-05-12 22:04 Juha Manninen Fixed in Revision => r63142
2020-05-12 22:04 Juha Manninen LazTarget => -
2020-05-12 22:04 Juha Manninen Note Added: 0122745
2020-05-13 10:48 Zaher Dirkey Status resolved => closed