Hint isn't updating anymore lazarus / 31-LCL ---------------------------------------------------------------------- tjones · 2010-08-01 10:18 Hi everyone, After updating from Lazarus 0.9.26.2 to 0.9.28.2 my hint isn't updating anymore when I'm hovering the mouse over my PaintBox inside an "OnMouseMove" event. I've been trying a lot of different things for the past few hours, but just can't get it to work. Compiling it AGAIN with the older Lazarus version, it WAS working again. Most things I found related to my problem were Delphi related, using procedures not (yet) available on Lazarus. So how to make it work again ? Example code: Code: [Select]procedure TForm1.PaintBox1MouseMove(Sender: TObject; Shift: TShiftState; X,Y: Integer); begin     PaintBox1.Hint := IntToStr(X) + '-' + IntToStr(Y); // == THINGS I TRIED THAT DIDN'T WORK FOR ME == //   PaintBox1.Invalidate; //   PaintBox1.Changed; //   PaintBox1.Update; //   PaintBox1.Repaint; //   PaintBox1.Refresh; //   Screen.UpdateScreen; //   Application.ProcessMessages; //   Application.CancelHint; //   Application.HintPause := 10; //   Application.HintShortPause := 1000; //   Application.Hint := IntToStr(X) + '-' + IntToStr(Y); //   Application.ShowHint := True; end;                                            The hint is never been updated as it used to be in the previous version 0.9.26.2 (FPC 2.2.2). It only updates when I "enter" the PaintBox control with the mouse cursor. Any help would be appreciated. Thank you ! ---------------------------------------------------------------------- felipemdc · 2010-08-01 13:45 Could you test with a Snapshot? Which operating system? ---------------------------------------------------------------------- tjones · 2010-08-01 14:23 I tried this before already with a snapshot, and now I tried it again with Lazarus 0.9.29 (FPC 2.4.3) SVN 26845. This time not with all possible code variations that I tried before, but only with these 4 lines inside the mouse event: PaintBox1.Hint := IntToStr(X) + '-' + IntToStr(Y); Application.ProcessMessages;  // could be working PaintBox1.Refresh; // probably not PaintBox1.Update; // probably not It's still the same issue here with my test application that only contains a single form, the PaintBox and a close button. I'm using WINDOWS 2000 SP4 by the way, but this hasn't changed from the previous Lazarus version where it worked. Can you reproduce it ? ---------------------------------------------------------------------- tjones · 2010-08-01 14:32 Btw, the "Identifier completion" (the code completion after a point) doesn't work anymore either in this snapshot, at least not for me. Not even by invoking it by CTRL+SPACE which takes me into LCLClasses window, strange... ---------------------------------------------------------------------- felipemdc · 2010-08-02 17:14 Please report both issues in the bug tracker and write explicitly that they are regressions, that way they will be targeted for 0.9.30 and the next version will have this working. I have also noticed the hint issue, but code completion works for me, although I haven't updated svn in the last weeks ---------------------------------------------------------------------- tjones · 2010-08-06 09:37 SOLVED: I reported the issue to the bug tracker team, and as a result the method 'Application.ActivateHint' (Delphi compatible) has been added and is available from SVN 27014. It works perfect now. For everyone interested, the following code works from SVN 27014: procedure TForm1.PaintBox1MouseMove(Sender: TObject; Shift: TShiftState; X,Y: Integer); begin   PaintBox1.Hint := IntToStr(X) + '-' + IntToStr(Y);   Application.ActivateHint(Mouse.CursorPos); end; You might want to add 'Application.HintPause := 10' in the FormCreate procedure which brings the delay down to 10ms after entering the PaintBox (or whatever object and timing you prefer). The color can be changed this way: 'Application.HintColor := clAqua'. Working perfect...