Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding a Form Icon 1

Status
Not open for further replies.

Sam050507

Programmer
Sep 13, 2005
18
0
0
US
Hi,

I've found this code snippit around the web, but when I try to install it in my program, the program fails.

class MyFrame(wx.Frame):
def __init__(self, parent, id, title):
wx.Frame.__init__(self, parent, id, title)
self.Bind(wx.EVT_MOVE, self.OnMove)
self.Bind(wx.EVT_SIZE, self.OnSize)

self.icon = wx.Icon("lion.ico", wxBITMAP_TYPE_ICO)
self.SetIcon(self.icon)

#//////

I get error: "NameError: global name 'wxBITMAP_TYPE_ICO' is not defined"

Does anybody know how to add a form icon?
 
Man...is that embarrassing.

Thanks very much just the same.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top