code: def OnMenu(self, event):
          
  
          __id = event.GetId()
          try:
              menuitem = event.GetEventObject().FindItemById(__id)
              selected_text = menuitem.GetItemLabel()
              self.search.SetValue(selected_text)
          except AttributeError:
              # Not called by menu
              event.Skip()
docs: Search history has been selected