Search code examples
pythonwxpythonsliders

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?


Solution

  • 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.