如何实现 SWT 浏览器小部件的放置目标
如何实现 SWT 浏览器小部件的放置目标?采取 浏览器实例作为 DropTarget
构造函数的参数不会导致 任何已注册的放置侦听器的通知。
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);
谢谢, 亨利
How to implement a drop target for the SWT browser widget? Taking a
Browser instance as parameter to the DropTarget
constructor causes no
notification of any registered drop listeners.
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);
Thanks,
Henry
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为这不容易实现,因为浏览器也是本机小部件的集合,请参阅:http://dev.eclipse.org/mhonarc/lists/platform-swt-dev/msg04523.html
我想到了两种解决方法
I think that's not easily possible since the Browser are a collection of native widgets as well, see this: http://dev.eclipse.org/mhonarc/lists/platform-swt-dev/msg04523.html
Two workarounds come to my mind: