code: def right_press(self, event):
          
          self.set_current()
          current = self.canvas.find_withtag("current")
          if current and current[0] in self.canvas.find_withtag("item"):
              # Display item_menu
              self.current = current[0]
              self.item_menu.tk_popup(event.x_root, event.y_root)
          else:
              # Display frame_menu
              self.frame_menu.tk_popup(event.x_root, event.y_root)
docs: Callback for the right mouse button event to pop up the correct menu.
          
          :param event: Tkinter event