TBalloonHint showing as default?

127 Views Asked by At

Create a VCL Forms Application, put a TBalloonHint and a TButton on the form and in the button's click-event handler write this code:

procedure TForm2.btnTestClick(Sender: TObject);
begin
  if balloonhintTest.ShowingHint then
    ShowMessage('balloonhintTest is showing')
  else
    ShowMessage('balloonhintTest is not showing');
end;

Strangely, when clicking the button at runtime, this message is displayed:

enter image description here

...although it has never programmatically been shown with balloonhintTest.ShowHint.

The only way I found so far to prevent this is the following workaround:

procedure TForm2.FormCreate(Sender: TObject);
begin
  balloonhintTest.HideHint;
end;

So why the BalloonHint is reported as showing (while it is not physically showing at all) as default, and is there a better way to set this to False as default?

0

There are 0 best solutions below