views:

34

answers:

1

Hello, 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 icon. 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

+1  A: 

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.

Rusty