wxpython display jpg in a frame
David C. Fox
davidcfox at post.harvard.edu
Tue Jul 22 17:27:19 EDT 2003
max4 wrote:
> hello
> i would like to know if there is a good tutorial about how to do this
> or if someone could explain
>
> thank you
>
> [ i want to add a jpg to an existing about dialog]
Create a wxImage from the jpg file, and then a wxBitmap from the image,
then a wxStaticBitmap control from the bitmap.
for example,
i = wxImage("about.jpg", wxBITMAP_TYPE_JPEG)
b = wxBitmapFromImage(i)
sb = wxStaticBitmap(dialog, b, pos, size)
As usual, see the wxPython demo for more details.
David
More information about the Python-list
mailing list