简体   繁体   English

如何使用Python的wxWidgets模块进行拖放?

[英]How to do drag & drop with wxWidgets module of Python?

I'm using Python and I want to do a drag & drop interface. 我正在使用Python,并且想创建一个拖放界面。 For example, with a large picture whose size is bigger then the screen, I want to click on it and drag it to see other parts. 例如,对于一张比屏幕大的大图片,我想单击它并将其拖动以查看其他部分。 Something like "google maps"! 像“谷歌地图”!

In google maps if we click two times we do "zoom" but if we click one time and while pressed, we move the mouse, we move around the map. 在google地图中,如果单击两次,则会执行“缩放”,但是如果单击一次,并在按下的同时,我们将移动鼠标,便会在地图上移动。 That's what I want to do! 那就是我想做的!

Is it possible to do this using wxWidgets module of Python? 是否可以使用Python的wxWidgets模块执行此操作? If so, how? 如果是这样,怎么办?

Thanks in advance :) 提前致谢 :)

I found the solution over here: http://www.java2s.com/Code/Python/Event/Mouseactiondrag.htm 我在这里找到了解决方案: http : //www.java2s.com/Code/Python/Event/Mouseactiondrag.htm

With this code I can do what I want! 使用此代码,我可以做我想做的!

And the name was only Mouse Drag and not Mouse Drag and Drop (soz) 而且名称仅是Mouse Drag,而不是Mouse Drag and Drop(soz)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM