X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8eca4fef106b8327e2e55636de3f68a511a4c392..b41b09e28513f8b30065914eeb1051a0a32e6e1b:/wxPython/demo/PopupMenu.py?ds=sidebyside diff --git a/wxPython/demo/PopupMenu.py b/wxPython/demo/PopupMenu.py index ce4775c94d..45925f22d5 100644 --- a/wxPython/demo/PopupMenu.py +++ b/wxPython/demo/PopupMenu.py @@ -79,7 +79,8 @@ class TestPanel(wx.Panel): menu = wx.Menu() # Show how to put an icon in the menu item = wx.MenuItem(menu, self.popupID1,"One") - item.SetBitmap(images.getSmilesBitmap()) + bmp = images.getSmilesBitmap() + item.SetBitmap(bmp) menu.AppendItem(item) # add some other items menu.Append(self.popupID2, "Two") @@ -96,7 +97,7 @@ class TestPanel(wx.Panel): # Popup the menu. If an item is selected then its handler # will be called before PopupMenu returns. - self.PopupMenu(menu, event.GetPosition()) + self.PopupMenu(menu) menu.Destroy()