X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/095315e20d117d292ea01f8f964b19c032a0fd56..6d99eb3e379fc5cdb835f9a87f92b612ec58dd1c:/wxPython/demo/PopupMenu.py?ds=inline diff --git a/wxPython/demo/PopupMenu.py b/wxPython/demo/PopupMenu.py index 45925f22d5..837e9c27d4 100644 --- a/wxPython/demo/PopupMenu.py +++ b/wxPython/demo/PopupMenu.py @@ -31,8 +31,6 @@ class TestPanel(wx.Panel): t = wx.StaticText(self, -1, "PopupMenu") t.SetFont(bf) box.Add(t, 0, wx.CENTER|wx.ALL, 5) - self.Bind(wx.EVT_RIGHT_UP, self.OnRightClick) - box.Add(wx.StaticLine(self, -1), 0, wx.EXPAND) box.Add((10,20)) @@ -40,14 +38,15 @@ class TestPanel(wx.Panel): t = wx.StaticText(self, -1, text) t.SetFont(nf) box.Add(t, 0, wx.CENTER|wx.ALL, 5) + t.Bind(wx.EVT_CONTEXT_MENU, self.OnContextMenu) self.SetSizer(box) - self.Bind(wx.EVT_RIGHT_UP, self.OnRightClick) + self.Bind(wx.EVT_CONTEXT_MENU, self.OnContextMenu) - def OnRightClick(self, event): - self.log.WriteText("OnRightClick\n") + def OnContextMenu(self, event): + self.log.WriteText("OnContextMenu\n") # only do this part the first time so the events are only bound once #