code: def _onMenuButton(self, evt):
          
          x, y = self.GetPositionTuple()
          w, h = self.GetSizeTuple()
          self.PopupMenuXY(self._menu, x, y+h-4)
                  # When menu returned, indicate selection in button
          evt.Skip()
docs: Handle menu button pressed.