Due to an apparent bug in the native control implementation, space could be
reserved for the second row of tabs even when the notebook was big enough to
need it. Sending it an extra WM_SIZE seems to be enough to fix this.
Closes #1792.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73755
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
if ( m_pages.GetCount() == 1 || HasFlag(wxNB_MULTILINE) )
{
AdjustPageSize(pPage);
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
}
// now deal with the selection