Ticket #12227 (closed defect: fixed)
wxNotebook::AddPage() forces the containing top level window to show
|Reported by:||bdheller||Owned by:|
I'm using a wxPropertySheetDialog with a wxNotebook. The creation code, which calls wxNotebook::AddPage() previously worked in 2.8.x. Using the trunk version of the wxOSX-Cocoa port however, the first call to AddPage during dialog creation makes the dialog show. Its size and position has not been set to anything sensible at this point, so a blank dialog appears in the top left screen corner, which is visually unpleasing.
I tracked this down to AddPage() calling ChangePage() and eventually Show() on the selected notebook page. I have attached a patch that solves the problem for me, by postponing the call to Show() into the first call of the OnSize() handler unless the wxNotebook is already shown anyway.