code: def OnMacroToolbarToggle(self, event):
          
  
          self.main_window.macro_toolbar.SetGripperVisible(True)
          macro_toolbar_info = self.main_window._mgr.GetPane("macro_toolbar")
  
          self._toggle_pane(macro_toolbar_info)
  
          event.Skip()
docs: Macro toolbar toggle event handler