• Post Reply Bookmark Topic Watch Topic
  • New Topic

SWT Label position on screen  RSS feed

 
Serge Glaeser
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello
i was wondering how i can find out the x and y position of a label on the screen because i wan to put the cursor there. getBounds() and getLocation() seem to give me only the location within the composite the label is in, but i want to know its x and y location on the screen.

Any ideas?

Thanks
 
Rob Spoor
Sheriff
Posts: 21095
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1) Take the X and Y relative to the parent.
2) Add the relative X and Y of the parent.
3) Repeat until you found a window with absolute X and Y location.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!