情報が少なかったのでよかったどうぞ
環境
MacBookPro(Retina, 13-inch, Early2015)
macOS Sierra version 10.12.6
Python3 3.6
wxPython 4.0.0b2
wxpython.py
# -*- coding: utf-8 -*-
#!/usr/bin/python3
import wx.adv
application = wx.App()
frame = wx.Frame(None, wx.ID_ANY, u"テストフレーム")
dock = wx.adv.TaskBarIcon(iconType=wx.adv.TBI_DOCK)
icon = wx.Icon("logo.png",wx.BITMAP_TYPE_PNG)
dock.SetIcon(icon)
frame.Show()
application.MainLoop()
wxpython.py
# -*- coding: utf-8 -*-
#!/usr/bin/python3
import wx.adv
application = wx.App()
frame = wx.Frame(None, wx.ID_ANY, u"テストフレーム")
dock = wx.adv.TaskBarIcon(iconType=wx.adv.TBI_DOCK)
icon = wx.Icon("logo.png",wx.BITMAP_TYPE_PNG)
dock.SetIcon(icon)
frame.Show()
application.MainLoop()
#TaskBarへのアイコン設定方法
wxstatusBar.py
#-*- coding: utf-8 -*-
#!/usr/bin/python3
import wx.adv
class TaskBarFrame(wx.Frame):
def __init__(self, parent):
wx.Frame.__init__(self, parent)
self.taskbar = wx.adv.TaskBarIcon()
icon = wx.Icon('logo.png', wx.BITMAP_TYPE_PNG)
self.taskbar.SetIcon(icon, '')
app = wx.App()
frame = TaskBarFrame(None)
frame.Show()
app.MainLoop()
参考サイト
https://stackoverflow.com/questions/2822052/how-to-add-osx-menu-bar-icon-with-wxpython