is it possible to connect two objects, if I move one of them then the other will move the same amount?
To be more clear I have created multiple sliders and I want to be able to sync them. I was thinking that I need to create a function in the widget class but I have no idea how to start it any help would be awesome
Connecting objects
Re: Connecting objects
There is nothing in wxWidgets that does this for you. You need to implement your own logic for that.
An elegant solution would be a small helper class that all sliders register to. And when one slider changes its value, this class will set the same value for all other sliders.
But you can also just add a method to the main frame that "knows" all sliders that syncs them manually.
An elegant solution would be a small helper class that all sliders register to. And when one slider changes its value, this class will set the same value for all other sliders.
But you can also just add a method to the main frame that "knows" all sliders that syncs them manually.
Use the source, Luke!