diff --git a/src/generic/listbkg.cpp b/src/generic/listbkg.cpp index 220a6cc025..013196dbaf 100644 --- a/src/generic/listbkg.cpp +++ b/src/generic/listbkg.cpp @@ -95,16 +95,10 @@ wxListbook::Create(wxWindow *parent, if ( GetListView()->InReportView() ) GetListView()->InsertColumn(0, wxS("Pages")); -#ifdef __WXMSW__ - // On XP with themes enabled the GetViewRect used in GetControllerSize() to - // determine the space needed for the list view will incorrectly return - // (0,0,0,0) the first time. So send a pending event so OnSize will be - // called again after the window is ready to go. Technically we don't - // need to do this on non-XP windows, but if things are already sized - // correctly then nothing changes and so there is no harm. - wxSizeEvent evt; - GetEventHandler()->AddPendingEvent(evt); -#endif + // Ensure that we rearrange the items in our list view after all the pages + // are added. + PostSizeEvent(); + return true; }