wxImage problem

Cliff Wells logiplexsoftware at earthlink.net
Fri Apr 12 14:57:10 EDT 2002


On 12 Apr 2002 11:48:50 -0700
Ed wrote:

> how can i put an image into a wxPanel?
> i read on the net that the code is ...
> 
> wxImage_AddHandler(wxGIFHandler())
> gif = wxImage('bitmaps/image.gif', wxBITMAP_TYPE_GIF).ConvertToBitmap()
> wxStaticBitmap(panel, -1, bmp, wxPoint(10, pos),wxSize(bmp.GetWidth
> (),bmp.GetHeight()))

Try something like this (not looking at the docs, so if I make a dumb mistake,
feel free to shoot me):

wxImage_AddHandler(wxGIFHandler())
gif = wxBitmapFromImage(wxImage('bitmaps/image.gif', wxBITMAP_TYPE_GIF))
bmp = wxStaticBitmap(panel, -1, gif, wxPoint(10, pos))

You should probably post questions like this to the wxPython user list (see
www.wxpython.org).

-- 
Cliff Wells, Software Engineer
Logiplex Corporation (www.logiplex.net)
(503) 978-6726 x308  (800) 735-0555 x308





More information about the Python-list mailing list