code: def on_click(self, event):
          
          button = event["button"]
          if button == self.button_toggle:
              self.toggled = True
              if self.mode == "ip":
                  self.mode = "status"
              else:
                  self.mode = "ip"
          elif button == self.button_refresh:
              self.idle_time = 0
          else:
              self.py3.prevent_refresh()
docs: Toggle between display modes 'ip' and 'status'