Skip to main content


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 14:59 Go to next message
Roland Tepp is currently offline Roland TeppFriend
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 21:49 Go to previous message
Eclipse UserFriend
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: Sat Apr 27 04:36:01 GMT 2024

Powered by FUDForum. Page generated in 0.02872 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top