Yes, setting a frame icon is done very simply. The real trick is to
acquire a good icon file, itself. It’s easiest to get or make a PNG
file and then convert it into a ICO file. I believe the PIL (Python
Imaging Library) can do this.
Much more tricky is creating a MSW System Tray with functionality. (see
2nd example below)
`==========================================
import wx
class MyMainFrame( wx.Frame ):
""" Tile Bar with Icon
From:
"""
def __init__( self ):
wx.Frame.__init__( self, None, wx.ID_ANY, 'Title Bar Caption' )
# Add a panel so it looks the correct on all platforms
self.panel = wx.Panel( self, wx.ID_ANY )
self.panel.SetBackgroundColour( (180, 220, 200) )
ico = wx.Icon( 'MY_TITLE_BAR_ICON.ICO', wx.BITMAP_TYPE_ICO )
self.SetIcon( ico )
#end __init__
#end MyMainFrame class
#-------------------------------------------------------------------- if name == ‘main’:
MyApp = wx.PySimpleApp( redirect=False )
frame = MyMainFrame().Show()
MyApp.MainLoop()
#end if