Page 1 of 1

wxDialog repaint not working on Mac

Posted: Mon Dec 16, 2019 5:06 pm
by deepti
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.
	Refresh();
	Update();
Please help!
Thank you!

Re: wxDialog repaint not working on Mac

Posted: Mon Dec 16, 2019 7:32 pm
by ONEEYEMAN
Hi,
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.