Repainting children from menu option

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.
Post Reply
dark.tempest360
In need of some credit
In need of some credit
Posts: 7
Joined: Fri Jun 15, 2018 4:24 pm

Repainting children from menu option

Post by dark.tempest360 »

Is there a way to refresh all child widgets of a wxFrame (or wxPanel) from clicking a menu option? Refresh() and Update() does not work. I've also read that Refresh() doesn't work unless if its called from the main thread and that there is no way to queue a paint event as well that would repaint the ui.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7459
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Repainting children from menu option

Post by ONEEYEMAN »

Hi,
All GUI calls has to be done in the main thread. No exceptions.
What you can do is to send a message from the secondary thread and in the main thread catch it and call the Refresh()/Update().

Thank you.
Post Reply