How to incorporate DRAG feature in wxPython
I want to incorporate DRAG feature in program where in I can drag (hand cursor) the canvas which is placed on a panel. DRAG feature will help me see a full picture if the image is out of bound on the axis or if the image is zoomed in.
Currently I am using wxmpl library which is a integration of matplotlib and wxPython. but i开发者_StackOverflow中文版t seems like this library does not have DRAG feature.
Any help in this regards is appreciated.
Thanks Damodar
wxmpl might be a bit outdated (it hasn't been updated in over a year and before that it went 2 years). The current releases of matplotlib provide excellent WX support. In fact the feature you want is already included with the NavigationToolbar and the FigureCanvasWxAgg included in the base matplotlib. Take a look at this example. I believe you are describing the "Pan" control (it's the arrows in all 4 directions icon).
精彩评论