code: def OnWidgetToolbarToggle(self, event):
          
  
          self.main_window.widget_toolbar.SetGripperVisible(True)
          widget_toolbar_info = self.main_window._mgr.GetPane("widget_toolbar")
  
          self._toggle_pane(widget_toolbar_info)
  
          event.Skip()
docs: Widget toolbar toggle event handler