0

Hello,
I am trying to use icons on my "File" menu using this code

fileMenu = wx.Menu()
log = wx.MenuItem(fileMenu, ID_LOG, '&Login\tCtrl+L')
fileMenu.AppendItem(log)
self.Bind(wx.EVT_MENU, self.OnLog, id=ID_LOG)
NewUser = wx.MenuItem(fileMenu, ID_NEWUSER, '&New User\tCtrl+N')
self.Bind(wx.EVT_MENU, self.NewUserDlg, id=ID_NEWUSER)
fileMenu.AppendItem(NewUser)
quitIcon = wx.ArtProvider.GetBitmap(wx.ART_QUIT, wx.ART_MENU, (16, 16))
quit = wx.MenuItem(fileMenu, 1, '&Quit\tCtrl+Q')
quit.SetBitmap(quitIcon)
fileMenu.AppendItem(quit)
self.Bind(wx.EVT_MENU, self.OnQuit, id=1)

On lines 8-10 I get an icon fro wx.ArtProvider and use it with the quit menu. However, I have never seen the icon when I run the app. Any idea?
Cheers!

Dani

1
Contributor
1
Reply
2
Views
8 Years
Discussion Span
Last Post by acrocephalus
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.