Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Drag Widgets in Composite/Canvas [SWT]  RSS feed

 
Jens Arnheim
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there!

As in the subject mentioned I want to drag around a widget
(e.g. button) in my composite/canvas.
My first approach:

Add DragDetectListener to my button
Add MouseMoveListener to my composite

Everything is connected over a DragHandler-Object.
When it receives an event from my DragDetectListener,
it takes the coordinates from the MouseMove-Event
and sets new coordinates in my button.

As you can imagine, my problem is that theres no
MouseMove detected when the cursor is placed on
my button :-\

Any suggestions?

Thanks a lot 'n greets,
Jens
 
Rob Spoor
Sheriff
Posts: 21090
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Jens A.",

Please read your private messages regarding an important announcement.

Thank you,

Rob
 
Jens Arnheim
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

First approach and more:

here
 
Campbell Ritchie
Marshal
Posts: 55698
163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jens Arnheim:
Hi!

First approach and more: . . .
Thank you.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!