summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
78250be)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22423
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
"""
import wx # This module uses the new wx namespace
"""
import wx # This module uses the new wx namespace
+print "wx.VERSION_STRING = ", wx.VERSION_STRING
#-------------------------------------------------------------------
from wxPython.wx import *
#-------------------------------------------------------------------
from wxPython.wx import *
import time
#-------------------------------------------------------------------
import time
#-------------------------------------------------------------------
menuBar.Append(menu4, "Chec&k")
menu5 = wxMenu()
menuBar.Append(menu4, "Chec&k")
menu5 = wxMenu()
+ # Show how to put an icon in the menu
+ item = wxMenuItem(menu5, 500, "&Smile!\tCtrl+S", "This one has an icon")
+ item.SetBitmap(images.getSmilesBitmap())
+ menu5.AppendItem(item)
+
menu5.Append(501, "Interesting thing\tCtrl+A", "Note the shortcut!")
menu5.AppendSeparator()
menu5.Append(502, "Hello\tShift+H")
menu5.Append(501, "Interesting thing\tCtrl+A", "Note the shortcut!")
menu5.AppendSeparator()
menu5.Append(502, "Hello\tShift+H")
EVT_MENU_RANGE(self, 401, 403, self.Menu401To403)
EVT_MENU_RANGE(self, 401, 403, self.Menu401To403)
+ EVT_MENU(self, 500, self.Menu500)
EVT_MENU(self, 501, self.Menu501)
EVT_MENU(self, 502, self.Menu502)
EVT_MENU(self, 503, self.TestRemove)
EVT_MENU(self, 501, self.Menu501)
EVT_MENU(self, 502, self.Menu502)
EVT_MENU(self, 503, self.TestRemove)
def Menu401To403(self, event):
self.log.write('From a EVT_MENU_RANGE event\n')
def Menu401To403(self, event):
self.log.write('From a EVT_MENU_RANGE event\n')
+ def Menu500(self, event):
+ self.log.write('Have a happy day!\n')
+
def Menu501(self, event):
self.log.write('Look in the code how the shortcut has been realized\n')
def Menu501(self, event):
self.log.write('Look in the code how the shortcut has been realized\n')