Hint at position lazarus / 31-LCL ---------------------------------------------------------------------- bigeno · 2014-10-04 16:16 I need to display the hint at a given position, exactly correct position. I use TImage.ShowHint and OnMouseMove. Everything works fine but I would like to modify offset of hint from the cursor. I try this onMouseMove but the position remains unchanged Code: [Select]       aPoint.X := X+10;        aPoint.Y := Y+20;        aPoint := ClientToScreen(aPoint);        Application.CancelHint;        Image1.Hint:=hints;        Application.ActivateHint(aPoint); ---------------------------------------------------------------------- exdatis · 2014-10-04 16:30 See this: http://forum.lazarus.freepascal.org/index.php/topic,25988.ms g158816.html#msg158816 OnMouseMove find(calculate) position and change hint p.s. Of course, the problem is a quick launch of mouse ---------------------------------------------------------------------- bigeno · 2014-10-04 16:54 You misread me. I want to modify the position of hints. I want to fix this (attachement): ---------------------------------------------------------------------- exdatis · 2014-10-04 17:16 Ah, I see, my mistake, sorry... Maybe you can use TPoupNotifer? ---------------------------------------------------------------------- typo · 2014-10-04 17:26 @bigeno, it does work if you don't change the hint content. Try to change it on OnMouseEnter event. But it seems to fail sometimes. ---------------------------------------------------------------------- taazz · 2014-10-04 17:37 which clientToscreen is called the one from timage or the one from tform? ---------------------------------------------------------------------- bigeno · 2014-10-04 18:26 @taazz from TImage, but it does not matter, does not work (position is still around the cursor - aPoint.X := X+20). @typo yes, it seems that a hint appears at randomly position around the cursor, my hint text based on mouse position so I can't change it OnMouseEnter @exdatis can I set time for hide in TPoupNotifer (and can hide the close icon for TPoupNotifer ) ? ---------------------------------------------------------------------- bigeno · 2014-10-04 18:55 I modified some internal procedure to display hints and it works perfectly. Hint appears directly under the cursor, same offset all the time. Application.inc Code: [Select]procedure TApplication.ShowHintWindow(const Info: THintInfoAtMouse); ...   // to reduce flicker   //HintInfo.HintPos.X:=HintInfo.HintPos.X and (not $F);   //HintInfo.HintPos.Y:=HintInfo.HintPos.Y and (not $F); I only comment these two lines. What does it mean? is it safe?  reduce flicker with $F ?? ---------------------------------------------------------------------- exdatis · 2014-10-04 19:48 Quote from: bigeno on October 04, 2014, 08:26:10 pm@exdatis can I set time for hide in TPoupNotifer (and can hide the close icon for TPoupNotifer ) ? maybe something like this: procedure TForm1.Timer1Timer(Sender: TObject); begin   PopupNotifier1.Hide; end;  p.s. timer/enabled-disabled ---------------------------------------------------------------------- bigeno · 2014-10-04 20:11 Quote from: exdatis on October 04, 2014, 09:48:47 pmmaybe something like this: procedure TForm1.Timer1Timer(Sender: TObject); begin   PopupNotifier1.Hide; end;  p.s. timer/enabled-disabled thanks but that was an attempt to workaround then problem with the wrong hint position. I think I stay with fix from my previous post, now I don't need correct hint position ---------------------------------------------------------------------- bigeno · 2014-10-04 20:15 BTW, I found revision when it (reduce flicker) was added, it was 12 years ago (maybe we now not needed this, I don't see any flicker) http://svn.freepascal.org/cgi- bin/viewvc.cgi?view=revision&root=lazarus&revision=3709 ---------------------------------------------------------------------- taazz · 2014-10-04 20:32 Quote from: bigeno on October 04, 2014, 10:15:16 pmBTW, I found revision when it (reduce flicker) was added, it was 12 years ago (maybe we now not needed this, I don't see any flicker) http://svn.freepascal.org/cgi- bin/viewvc.cgi?view=revision&root=lazarus&revision=3709 First try it on a 300 $ laptop then talk about fliker. ---------------------------------------------------------------------- bigeno · 2014-10-04 20:43 Quote from: taazz on October 04, 2014, 10:32:35 pm First try it on a 300 $ laptop then talk about fliker. I have somewhere Compaq evo n610c , I will try ---------------------------------------------------------------------- exdatis · 2014-10-06 05:57 Quote from: bigeno on October 04, 2014, 10:11:03 pmthanks but that was an attempt to workaround then problem with the wrong hint position. I think I stay with fix from my previous post, now I don't need correct hint position  I use: PopupNotifier1.ShowAtPos(Mouse.CursorPos.x, Mouse.CursorPos.y);