Recent

Author Topic: Trayicon: showballonhint when instead hint (eg.: when mouseover)  (Read 3546 times)

dcminus

  • New Member
  • *
  • Posts: 24
Hey

should be an easy one but could not think of an elegant way to do this. I would like to show a ballonhint when my cursor is over the trayicon.

thank you,

DC-



GAN

  • Sr. Member
  • ****
  • Posts: 370
Lazarus 2.0.8 FPC 3.0.4 Linux Mint Mate 19.3
Zeos 7̶.̶2̶.̶6̶ 7.1.3a-stable - Sqlite 3.32.3 - LazReport

balazsszekely

  • Guest
Re: Trayicon: showballonhint when instead hint (eg.: when mouseover)
« Reply #2 on: January 31, 2018, 05:44:24 am »
Set BalloonFlags, BalloonHint, BalloonTimeOut then:
Code: Pascal  [Select][+][-]
  1. procedure TForm1.FormCreate(Sender: TObject);
  2. begin
  3.   TrayIcon1.Show;
  4. end;
  5.  
  6. procedure TForm1.TrayIcon1MouseMove(Sender: TObject; Shift: TShiftState; X,
  7.   Y: Integer);
  8. begin
  9.   TrayIcon1.ShowBalloonHint;
  10. end;  

dcminus

  • New Member
  • *
  • Posts: 24
Re: Trayicon: showballonhint when instead hint (eg.: when mouseover)
« Reply #3 on: February 03, 2018, 12:51:39 am »
@GetMem: tried the same, but it went blinking mad :/ i should probably add a check if it is already showing and only on mousemove if it is not visible, but could not find .visible for ballonhint

@GAN: hmm, that might be suitible for this.

balazsszekely

  • Guest
Re: Trayicon: showballonhint when instead hint (eg.: when mouseover)
« Reply #4 on: February 03, 2018, 07:38:41 am »
Quote
@GetMem: tried the same, but it went blinking mad :/ i should probably add a check if it is already showing and only on mousemove if it is not visible, but could not find .visible for ballonhint
Works fine with Lazarus trunk/FPC 3.0.4, both under windows and linux. What is your configuration?

ASerge

  • Hero Member
  • *****
  • Posts: 2223
Re: Trayicon: showballonhint when instead hint (eg.: when mouseover)
« Reply #5 on: February 03, 2018, 11:46:43 am »
@GetMem: tried the same, but it went blinking mad :/ i should probably add a check if it is already showing and only on mousemove if it is not visible, but could not find .visible for ballonhint
Also blinking. Windows 7, Lazarus 1.8
In my opinion, this property is used in different ways. To display information about the application (when you hover the mouse), the Hint property is used. But if the application itself does something and wants to attract the user's attention, then ShowBalloonHint is used. This hint automatically disappears through the specified interval to avoid annoying the user.

 

TinyPortal © 2005-2018