最近几天为openWRT gui应用程序开发python跨平台项目。 可以使用wxpython在菜单右侧显示图像吗?
def mainMenu(wxMenu):
TBMENU_RESTORE = wx.NewId()
TBMENU_CLOSE = wx.NewId()
TBMENU_CHANGE = wx.NewId()
TBMENU_REMOVE = wx.NewId()
menu = wx.Menu()
menu.Append(1138, "DL: 115,5 | UL: 85,2")
menu.Enable(1138, False)
menu.AppendSeparator()
menu.AppendCheckItem(1109, "tes1")
menu.AppendCheckItem(1110, "tes2")
menu.AppendCheckItem(1111, "tes3")
menu.Check(1111, True)
menu.AppendSeparator()
menu.Append(wx.NewId(), "Turn Guest Network Off")
menu.AppendSeparator()
menu.Append(TBMENU_RESTORE, "Settings")
menu.Append(TBMENU_CLOSE, "Quit")
wxMenu.Bind(wx.adv.EVT_TASKBAR_LEFT_DCLICK, wxMenu.MenuOpen)
wxMenu.Bind(wx.EVT_MENU, wxMenu.MenuOpen, id=TBMENU_RESTORE)
wxMenu.Bind(wx.EVT_MENU, wxMenu.QuitApp, id=TBMENU_CLOSE)
item = wx.MenuItem(menu, wx.ID_ANY, "Snake", "This menu has a picture!")
img = wx.Image('snake32.bmp', wx.BITMAP_TYPE_ANY)
item.SetBitmap(wx.BitmapFromImage(img))
menu.AppendItem(item)
return menu