Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » DnD between SWTwidget and oleControl
DnD between SWTwidget and oleControl [message #458838] Fri, 22 July 2005 09:01
Eclipse UserFriend
Originally posted by: Uwe.Stachel.dp-itsolutions.de

Hello,

How is it possible to realize Drag&Drop between a swt-widget and
ole-control?
(Drag sth from a swt widget and drop it over a ole-control) In Eclipse sth
like this seems to work (e.g. open a in place editor and drag sth in...)
Unfortunally I was not able to find the implementation of the
IInplaceEditorInterface

I've tried the following, unfortunately with no success:

int operations = DND.DROP_MOVE | DND.DROP_COPY |
DND.DROP_DEFAULT;
Transfer[] types = new Transfer[] {
ObjectTransfer.getInstance() };
DropTarget target = new DropTarget(frame, operations);
target.setTransfer(types);

target.addDropListener (new DropTargetListener() {
public void dragEnter(DropTargetEvent event) {
event.detail = DND.DROP_COPY;
};
public void dragOver(DropTargetEvent event) {
event.feedback = DND.FEEDBACK_SELECT |
DND.FEEDBACK_SCROLL;
};
public void dragLeave(DropTargetEvent event) {};
public void dragOperationChanged(DropTargetEvent
event) {};
public void dropAccept(DropTargetEvent event) {}
public void drop(DropTargetEvent event) {
System.out.println("DND-Event!");
}

What do I have to implement in the ole wrapper at eclipse-side and what in
the ole control itself?

Any idea?

Thanks a lot!
Previous Topic:Nigihtly swt builds
Next Topic:DND DND.FEEDBACK_INSERT_BEFORE in TreeTable
Goto Forum:
  


Current Time: Tue Apr 23 17:05:57 GMT 2024

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

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

Back to the top