How to make two wxPanel instances reflect each other?

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Experienced Solver
Experienced Solver
Posts: 89
Joined: Mon Apr 24, 2017 4:23 am

How to make two wxPanel instances reflect each other?

Postby tomay3000 » Tue Jun 12, 2018 9:41 pm

as the title says, I have two wxPanel derived-class instances which are child windows of two different wxFrames,
I want these two wxPanels to reflect each other (i.e. any change to on instance will apply to the other. e.g if a slider inside that wxPanel is moved to one position, the slider of the other wxPanel should move to that same position, and so on).

is there an automation way to do it, like connecting both to the same event handler?
if so, How?

Thank you.

User avatar
Can't get richer than this
Can't get richer than this
Posts: 867
Joined: Sun May 13, 2012 11:42 pm
Location: France

Re: How to make two wxPanel instances reflect each other?

Postby eranon » Tue Jun 12, 2018 10:13 pm

Hello, It depends if the two frames are in the same process or not. If yes, you can manage to send events from a frame to the other one from the first called event handler. If no, it's about interprocesses communication (for example, in Windows see there) ; I don't know if wxWidgets provides wrappers in this domain (you have to take a look at the doc).
[Ind. dev. - wxWidgets 3.0/3.1 under "Win 7 64-bit, TDM64-GCC" + "OS X 10.9, LLVM Clang"]

Return to “C++ Development”

Who is online

Users browsing this forum: No registered users and 26 guests