DnD between SWTwidget and oleControl [message #458838] |
Fri, 22 July 2005 09:01 |
Eclipse User |
|
|
|
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!
|
|
|
Powered by
FUDForum. Page generated in 0.02682 seconds