code: def OnMainToolbarToggle(self, event):
          
  
          self.main_window.main_toolbar.SetGripperVisible(True)
          main_toolbar_info = \
              self.main_window._mgr.GetPane("main_window_toolbar")
  
          self._toggle_pane(main_toolbar_info)
  
          event.Skip()
docs: Main window toolbar toggle event handler