如何为SWT浏览器小部件实现放置目标?将Browser实例作为DropTarget构造函数的参数会导致不会通知任何已注册的drop listener.
Browser browser = new Browser(parent, SWT.NONE);
int operations = DND.DROP_MOVE | DND.DROP_COPY | DND.DROP_DEFAULT;
DropTarget target = new DropTarget(browser, operations);
target.setTransfer(...)
DropTargetListener listener = ...;
target.addDropListener(listener);
Run Code Online (Sandbox Code Playgroud)
谢谢,亨利