Christoph
Christoph

Reputation: 1340

wxPython Sliders that influence each other

I am writing a program based on this matplotlib slider example. Now I want to create a third slider that acts as a parent slider and changes both sliders at the same time. Does anybody know a good tutorial on that topic? Or a way how to implement it in this example?

Upvotes: 1

Views: 258

Answers (1)

tom10
tom10

Reputation: 69192

This should be fairly easy to do. Catch the EVT_SCROLL events issued from the "parent" slider, and when these occur, have the handler call SetValue(position) for each of the two "child" sliders. This way, you can set them based on whatever algorithm you choose.

Upvotes: 2

Related Questions