No real changes, just make it possible to change how the pages are hidden and
shown in the derived classes. This is not used by any of them yet, but will be
used by wxSimplebook soon.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72406
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
{ wxFAIL_MSG(wxT("Override this function!")); }
{ wxFAIL_MSG(wxT("Override this function!")); }
+ // The derived class also may override the following method, also called
+ // from DoSetSelection(), to show/hide pages differently.
+ virtual void DoShowPage(wxWindow* page, bool show) { page->Show(show); }
+
+
// Should we accept NULL page pointers in Add/InsertPage()?
//
// Default is no but derived classes may override it if they can treat NULL
// Should we accept NULL page pointers in Add/InsertPage()?
//
// Default is no but derived classes may override it if they can treat NULL
if ( !(flags & SetSelection_SendEvent) || allowed)
{
if ( oldSel != wxNOT_FOUND )
if ( !(flags & SetSelection_SendEvent) || allowed)
{
if ( oldSel != wxNOT_FOUND )
- m_pages[oldSel]->Hide();
+ DoShowPage(m_pages[oldSel], false);
wxWindow *page = m_pages[n];
page->SetSize(GetPageRect());
wxWindow *page = m_pages[n];
page->SetSize(GetPageRect());
+ DoShowPage(page, true);
// change selection now to ignore the selection change event
UpdateSelectedPage(n);
// change selection now to ignore the selection change event
UpdateSelectedPage(n);