// wxWindows
#ifndef WX_PRECOMP
- #include <wx/string.h>
+ #include "wx/string.h"
#endif // WX_PRECOMP
-#include <wx/log.h>
-#include <wx/imaglist.h>
-#include <wx/event.h>
-#include <wx/control.h>
-#include <wx/notebook.h>
+#include "wx/log.h"
+#include "wx/imaglist.h"
+#include "wx/event.h"
+#include "wx/control.h"
+#include "wx/notebook.h"
-#include <wx/msw/private.h>
+#include "wx/msw/private.h"
// Windows standard headers
#ifndef __WIN95__
// event table
// ----------------------------------------------------------------------------
-#if !USE_SHARED_LIBRARIES
BEGIN_EVENT_TABLE(wxNotebook, wxControl)
EVT_NOTEBOOK_PAGE_CHANGED(-1, wxNotebook::OnSelChange)
IMPLEMENT_DYNAMIC_CLASS(wxNotebook, wxControl)
IMPLEMENT_DYNAMIC_CLASS(wxNotebookEvent, wxNotifyEvent)
-#endif
// ============================================================================
// implementation
m_aPages.Remove(nPage);
+ if ( m_aPages.IsEmpty() )
+ m_nSelection = -1;
+
return TRUE;
}
TabCtrl_DeleteAllItems(m_hwnd);
+ m_nSelection = -1;
+
return TRUE;
}
GetSize((int *)&rc.right, (int *)&rc.bottom);
TabCtrl_AdjustRect(m_hwnd, FALSE, &rc);
pPage->SetSize(rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top);
- if ( pPage->GetAutoLayout() )
- pPage->Layout();
// some page should be selected: either this one or the first one if there is
for ( size_t nPage = 0; nPage < nCount; nPage++ ) {
wxNotebookPage *pPage = m_aPages[nPage];
pPage->SetSize(rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top);
- if ( pPage->GetAutoLayout() )
- pPage->Layout();
}
event.Skip();