Kirix Support Forums

How to hide caption in wxAuiNotebook?

Please post all general questions, comments, bug reports, and any other wxAUI feedback here.

How to hide caption in wxAuiNotebook?

Postby soaringhawkzf on Sat Dec 11, 2010 3:26 am

I want to hide wxAuiToolBar/wxTreeCtrl and wxAuiNotebook's caption in full screen mode.
It works to hide wxAuiToolBar/wxTreeCtrl, but the wxAuinotebook's caption still exists.
Anyone know how to hide caption in wxAuiNotebook?

NavToolBar: wxAuiToolBar
NavMenu: wxTreeCtrl
ContentPane: wxAuiNotebook
Code: Select all
   if ( this->IsFullScreen() ) // switch to window mode
   {
      this->m_mgr.GetPane(wxT("NavToolBar")).Show(true);
      this->m_mgr.GetPane(wxT("NavMenu")).Show(true);
      this->m_mgr.GetPane(wxT("ContentPane")).CaptionVisible(true);
   }
   else // switch to full screen mode
   {
      this->m_mgr.GetPane(wxT("NavToolBar")).Show(false);
      this->m_mgr.GetPane(wxT("NavMenu")).Show(false);
      this->m_mgr.GetPane(wxT("ContentPane")).CaptionVisible(false);
   }

   this->ShowFullScreen(!this->IsFullScreen(), wxFULLSCREEN_ALL);

   this->m_mgr.Update();
soaringhawkzf
Registered User
 
Posts: 3
Joined: Tue Nov 23, 2010 7:14 am

Re: How to hide caption in wxAuiNotebook?

Postby soaringhawkzf on Sat Dec 11, 2010 3:49 am

I also set activated panel's window style, but it doesn't work.

Code: Select all
   wxWindow*   pActivatedPanel   =
      this->m_pContentPane->GetPage( this->m_pContentPane->GetSelection() );
   if ( this->IsFullScreen() ) // switch to window mode
   {
      this->m_mgr.GetPane(wxT("NavToolBar")).Show(true);
      this->m_mgr.GetPane(wxT("NavMenu")).Show(true);
      this->m_mgr.GetPane(wxT("ContentPane")).CaptionVisible(true);

      pActivatedPanel->SetWindowStyleFlag( pActivatedPanel->GetWindowStyle() | wxCAPTION );
   }
   else // switch to full screen mode
   {
      this->m_mgr.GetPane(wxT("NavToolBar")).Show(false);
      this->m_mgr.GetPane(wxT("NavMenu")).Show(false);
      this->m_mgr.GetPane(wxT("ContentPane")).CaptionVisible(false);

      pActivatedPanel->SetWindowStyleFlag( pActivatedPanel->GetWindowStyle() & ~wxCAPTION );
   }
   pActivatedPanel->Update();

   this->ShowFullScreen(!this->IsFullScreen(), wxFULLSCREEN_ALL);

   this->m_mgr.Update();
soaringhawkzf
Registered User
 
Posts: 3
Joined: Tue Nov 23, 2010 7:14 am

Return to wxAUI Questions, Thoughts & Feedback