Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Drag selection image
Drag selection image [message #480814] Tue, 18 August 2009 10:59 Go to next message
Roland Tepp is currently offline Roland Tepp
Messages: 336
Registered: July 2009
Senior Member
Hi,

is there a way to influence the image that is created when I start
dragging table items around?

--
Roland
Re: Drag selection image [message #481417 is a reply to message #480814] Thu, 20 August 2009 17:49 Go to previous message
Eclipse User
Originally posted by: phillipus.nowhere.net

Roland Tepp wrote:
> Hi,
>
> is there a way to influence the image that is created when I start
> dragging table items around?
>

Yes. You need to supply a DragSourceEffect like:

public class MyDragSourceEffect extends DragSourceEffect {

public MyDragSourceEffect(Control control) {
super(control);
}

@Override
public void dragStart(DragSourceEvent event) {
event.image = createYourImage();
}
}

And set it in the TableViewer's DragSource.

Phillipus
Previous Topic:Random Error in SWT
Next Topic:tabs are not drawn
Goto Forum:
  


Current Time: Mon Jul 28 02:19:53 EDT 2014

Powered by FUDForum. Page generated in 0.02214 seconds