wxDialog repaint not working on Mac

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
Earned some good credits
Earned some good credits
Posts: 115
Joined: Tue Jul 17, 2018 5:38 pm

wxDialog repaint not working on Mac

Post by deepti » Mon Dec 16, 2019 5:06 pm

Hi All,

There is a wxDialog which has a lot of widgets (lot of wxButton, wxHyperlinkCtrl, wxStaticText, wxBoxSizer etc).
Now, when a particular button is clicked, one static text changes and hence the size changes.
Because of this, it results in an overlap of that text control with the adjoining button.
In the button click event handler, I have the following stuff, yet it does not work correctly.
And this issue is only on Mac. On Windows, it works fine with just SetSizerAndFit.

Code: Select all

        SetSizerAndFit(m_boxSizerMain); //m_boxSizerMain is the main box sizer of the dialog.
Please help!
Thank you!

Part Of The Furniture
Part Of The Furniture
Posts: 4430
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wxDialog repaint not working on Mac

Post by ONEEYEMAN » Mon Dec 16, 2019 7:32 pm

When the layout of the window changes, one should just call Layout(0 on the window pointer or on the outmost sizer.

I'm surprised this works on Windows. ;-)

Thank you.

Post Reply