Using TrayIcon plugin for Servoy

Questions and answers on developing, deploying and using plugins and JavaBeans

Using TrayIcon plugin for Servoy

Postby hunter.baugus » Thu Jan 29, 2015 1:00 am

Hello there, I am getting into programming and struggling with this plugin called http://www.servoy-plugins.de/plugins/trayicon/trayicon-plugin.html. I am trying to create a tray icon that acts similar to that of Microsoft Security Essentials icon where it stays there even when the window is closed, running in the background. With the ability to open the application back up by double-clicking on the icon.

I have tried for a few hour and to no avail. I've managed to get an Icon to show but upon double-clicking, it pulls up an empty shell of a window instead of my form.

This is really important to me, thank you for reading this and I hope you will help me.
this is the sad excuse for code i currently have on the subject, closing out the icon i want to be a right-click feature with a "Quit" option, but for now i just have it close out through i button in the form. I need functionality before aesthetics.
Code: Select all
function onLoad(event) {
   plugins.TrayIcon.register( "ProjecTools", "hifLZg2tTtimg0LAv6G8Pda6SNonPKD1sPtYtjv3gWqIo90ulEQe1w==" );
   plugins.TrayIcon.showTrayIcon("media:///Status-tray-away-icon.png");
   plugins.TrayIcon.setTooltip('Super Usful Tooltip');
   plugins.TrayIcon.setPopupMenu(Object["Quit"])
   plugins.TrayIcon.onActionMethodArgs = new Array(1, 2, 3);
   plugins.TrayIcon.showMessage("Important information coming from your solution LIVE!",
      plugins.TrayIcon.messageType_WARNING);
   plugins.TrayIcon.setIcon('media:///trayicon_alternative.png');
   plugins.TrayIcon.setTooltip('Servoy solution');
}
hunter.baugus
 
Posts: 1
Joined: Wed Jan 14, 2015 12:54 am

Return to Plugins and Beans

Who is online

Users browsing this forum: Google [Bot] and 3 guests