Trying to find a pure python scrollbar, slider or guage widget to control the x axis of a graph (wxPython)
Does anyone know of an example / tutorial of one? I want to control the x-min and x-max values of an xy plot (for 开发者_如何学编程mpl) using mouse clicks / drag & drop in wxPython-
Thx in advance.
--DM
This should be pretty easy to do. Have you looked at the docs and this example?
So when the slider changes, you can easily set the values you desire. Also, there is a SetMin
and SetMax
method for what you want.
The RulerCtrl widget by Andrea Gavana can probably do what you want.
It's "pure Python" as much as any Python GUI can be in the sense that it's built from wxPython primitives. Below is a screenshot from the wxPython demo. You can click on the arrows and drag them along the ruler.
精彩评论