SWT Tray Icon Popup
I'm playing with a Tray and TrayItem in SWT, and i was wondering if there was a way of getting the location on screen of the i开发者_如何转开发con. I want to be able to position another shell just underneath it as if it were a popup.
Basicaly just having a mare trying to find the dimensions and location of it....
Any ideas?
Cheers
Andy
Why would you need this?
If the trigger for displaying the pop-up is a mouse click, you can use the Event object of the listener to get the co-ordinates.
If not, I don't think its a good idea to do this. Mainly because you never know whether a tray icon will be visible or not (in Windows 7 for example). If you are using Gnome, you can use libNotify, which is a much better choice for pop-ups.
精彩评论