wxPython question
mefjr75 at hotmail.com
mefjr75 at hotmail.com
Thu Dec 16 20:46:40 EST 2004
Jive wrote:
> How the heck do you set the icon on a frame using a .ico file, or a
.bmp
> file, or whatever? How do you find out how to do something like
that?
> Apparently there is no documentation to speak of. I tried looking
the in
> the demo program, but I didn't find the secret..
Hello Jive,
# this is a bit old but should still work
# might have to tweak the wx stuff
# because of the namespace change. ex. wxImage -> wx.Image
# image size must be 32h 32w
image = wxImage(file, wxBITMAP_TYPE_JPEG)
image = image.ConvertToBitmap()
icon = wxEmptyIcon()
icon.CopyFromBitmap(image)
frame.SetIcon(icon)
Be sure to look thru the demo it is very informative and is really the
best documention.
As they say use the source Luke.
Hth,
M.E.Farmer
More information about the Python-list
mailing list