ralfiii
ralfiii

Reputation: 676

Delphi TTrayIcon baloonhint misbehaves when triggered twice

My question has been closed as it "similar to another question" (how to close baloonhint programiatically). I should re-phrase the question. But the linked other article is not related to my question. Therefore I don't know how I should re-phrase properly. MAybe the person responsible for closing this issue could read again...


Let's say I display baloonhint "A". While it's still showing, I would like to update to a new state.

As described in other articles like Close TrayIcon Balloon Programmatically , I cancel the old ballonhint by setting

TrayIcon1.BalloonHint := '';

When I then trigger a new ShowBaloonHint with a different text "B", the system completely misbehaves.

To reproduce use the following code and click on one button after another:

procedure TForm1.Button1Click(Sender: TObject);
begin
     TrayIcon1.BalloonHint := 'AAA';
     TrayIcon1.ShowBalloonHint;
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
     TrayIcon1.BalloonHint := '';
end;

procedure TForm1.Button3Click(Sender: TObject);
begin
     TrayIcon1.BalloonHint := 'New state';
     TrayIcon1.ShowBalloonHint;
end;
  1. The "AAA" baloon pops up
  2. Then ballonhint is removed.
  3. First the "New state" ballon shows up, but without the required icon. Then after the standard timeout this wrong windows disappears and the new expected hint WITH the icon pops up again.

This behaviour is identically for Delphi11 and Delphi2010.

Upvotes: 0

Views: 71

Answers (0)

Related Questions