Lazarus
Programming => General => Topic started by: SWM1 on March 23, 2023, 09:07:23 am
-
SysTraIcon events do not work. :o I need to distinguish which mouse key is pressed when clicking on my SysTrayIcon, but not a single event on the SysTrayIcon works. Does anyone have any ideas how to overcome this? Thanks in advance for any help! The menu works, but equally with the right and left mouse button.
PopUpMenuTray.OnPopUp does not work either. %)
-
Lazarus 2.3.0 (rev 0d507a4009) FPC 3.2.2 x86_64-win64-win32/win64
Tested under MS Windows 10, 64bit built, no problems, everything works like it should.
What OS / FPC / Lazarus versions you are using?
-
Attached a minimal demo.
Open project and assign some icon/image to the TTrayIcon component, compile and run.
-
Thank you! I have Lazarus 2.2.6. And the Linux Mint 21.1 system. I tried to look at the text of the component - it seems that everything is correct, but for some reason it does not work. Unlike a simple pop-up menu.
-
Please test my demo and tell if it works like it should.
It should tell what button pressed on a label and only on right click open menu and menu just have one executable entry called exit what close the app.
-
Attached a minimal demo.
Open project and assign some icon/image to the TTrayIcon component, compile and run.
Tried - it doesn't work for me. Ignores events. :'(
-
For *nix there are some remarks noted here (https://wiki.freepascal.org/How_to_use_a_TrayIcon#Linux_may_not_display_the_Icon), since I am on Windows I can not help further :(
-
Thank you!
-
I realized that you can't do anything here! This is a limitation for Linux that cannot be overcome.
Thanks again for the link!