Hi,
I’m trying for the first time to create an app that runs from the tray in
Linux.
I started with the code from the Language Ref:
I created the class: Tray As AppTrayItem
in the App.Open event handler:
Tray = New AppTrayItem
If Not Self.AddTrayItem(Tray) Then
// There was an error adding the TrayItem
msgbox “It didn’t work”
End If
I also put in the code suggested for clicks and closing the tray
The app compiles and runs, but not in the tray and i don’t see the error
message I put in app open.
it does not work for me too. (Elementary OS 32bit)
my Code
#if TargetLinux then
Tray = New AppTrayItem
Tray.Icon = date16
Tray.HelpTag = "Test"
If Not Self.AddTrayItem(Tray) Then
// There was an error adding the TrayItem
msgbox "It didn't work"
End If
#endif
Hi Patrick,
Thanks for your reply. Yes I do have the App property. I tried it today with a new project that has nothing in it except a window and the TrayItem code. It still launches and appears in the task bar at the bottom, but it does not go into the tray and I do not get the message box telling me it failed.
I’m using Xojo 2013r3, although TrayItems have apparently been around since the Real Studio days. I’m also trying it on a 3 year old Debian Squeeze install with Gnome 2.
Also, launching the test app from the console does not produce any error messages.
Hi Axel,
I’ve tried it on Mint 17.3, which is also a Ubuntu derivative and it still insists on running in the task bar.
I’m using the Mate desktop. Which one are you using?
Thanks Axel,
It works. I had missed the part about putting in an icon.
Unfortunately, I seem to have asked the wrong question. What I want to do is build something that works like the “Screenlets” set of apps. These run in the tray, but leave a window open on the screen and do not appear in the taskbar.
The main thing I want is “not in the task bar”. The tray part isn’t actually necessary.
Sorry I didn’t ask this right. And thanks for your help!
Don