]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/notebook.cpp
Document lack of wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_CLICK under OS X.
[wxWidgets.git] / src / msw / notebook.cpp
index 1d69e439bbe43f7fb73cda7a8d1cec1c180c0324..d51c996daf164ba4aa450bf64c3677aecf56a280 100644 (file)
@@ -736,6 +736,14 @@ bool wxNotebook::InsertPage(size_t nPage,
     if ( m_pages.GetCount() == 1 || HasFlag(wxNB_MULTILINE) )
     {
         AdjustPageSize(pPage);
+
+        // Additionally, force the layout of the notebook itself by posting a
+        // size event to it. If we don't do it, notebooks with pages on the
+        // left or the right side may fail to account for the fact that they
+        // are now big enough to fit all all of their pages on one row and
+        // still reserve space for the second row of tabs, see #1792.
+        const wxSize s = GetSize();
+        ::PostMessage(GetHwnd(), WM_SIZE, SIZE_RESTORED, MAKELPARAM(s.x, s.y));
     }
 
     // now deal with the selection