Recent

Author Topic: BalloonHint in Trayicons ?  (Read 5122 times)

Fred vS

  • Hero Member
  • *****
  • Posts: 3776
    • StrumPract is the musicians best friend
BalloonHint in Trayicons ?
« on: November 06, 2012, 10:50:52 pm »
Hello folks
In the component TrayIcon, they are BalloonHint, BalloonTimeout, Balloonflag and BalloonTitle properties.
But i don not understand how to use it.
And what is the difference with Hint ?
Thanks

PS: The transparency of icons in TrayIcon do not work with Qt, is there a plan to do it work ? (but works perfectly for GTK2 and Windows.)
« Last Edit: November 06, 2012, 10:56:10 pm by Fred vS »
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

Laksen

  • Hero Member
  • *****
  • Posts: 802
    • J-Software
Re: BalloonHint in Trayicons ?
« Reply #1 on: November 06, 2012, 11:11:46 pm »
When you want to show a balloon hint you call the ShowBalloonHint procedure of the trayicon :)

Fred vS

  • Hero Member
  • *****
  • Posts: 3776
    • StrumPract is the musicians best friend
Re: BalloonHint in Trayicons ?
« Reply #2 on: November 07, 2012, 08:39:54 pm »
@ Laksen : Thanks, i gonna try that...

About the transparency of icons with Qt, do you have any idea how to correct it ?
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

CM630

  • Hero Member
  • *****
  • Posts: 1601
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: BalloonHint in Trayicons ?
« Reply #3 on: December 04, 2025, 10:59:42 am »
A few years later:
BalloonHint works only on Windows ( I added some info in https://wiki.freepascal.org/How_to_use_a_TrayIcon#Methods).
But the balloon is titled “Microsoft.Explorer.Notification {some number...”. Is there a way to change it?
Лазар 4,4 32 bit (sometimes 64 bit); FPC3,2,2

CM630

  • Hero Member
  • *****
  • Posts: 1601
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: BalloonHint in Trayicons ?
« Reply #4 on: December 05, 2025, 09:47:18 am »
And here is what I found this morning (in Windows 11):
In the code below if TrayIcon.Show; is commented, I get a custom balloon, probably a TPopupNotifier.
But if it is not commented, the native Windows notification balloon is shown. And the contents of the balloon are displayed in the Notification List of the Windows.
Is this the expected behaviour?

Code: Pascal  [Select][+][-]
  1. procedure TForm1.Button1Click(Sender: TObject);
  2. var
  3.   TrayIcon : TTrayIcon;
  4. begin
  5.   TrayIcon := TTrayIcon.Create(Self);
  6.   TrayIcon.BalloonTitle := 'BalloonTitle';
  7.   TrayIcon.BalloonHint := 'BalloonHint';
  8.   TrayIcon.BalloonFlags := bfWarning;
  9. //  TrayIcon.Show;
  10.   TrayIcon.ShowBalloonHint;
  11. //  TrayIcon.Free;
  12. end;    

I have not tried it on Linux yet.
Лазар 4,4 32 bit (sometimes 64 bit); FPC3,2,2

 

TinyPortal © 2005-2018