wxPython: wxStaticBitmap and large images

Will McGugan will at willmcgugan.com
Thu Jul 20 08:00:08 EDT 2006


Roger Miller wrote:
> I have a WxPython app that displays images that are typically around
> 600x600 pixels. I use a wxStaticBitmap, which appears to work fine on
> Windows XP. However the documentation states that a StaticBitmap "...
> is meant for display of the small icons in the dialog boxes and is not
> meant to be a general purpose image display control. In particular,
> under Windows 9x the size of bitmap is limited to 64*64 pixels and thus
> you should use your own control if you want to display larger images
> portably".
>
> Assuming that I don't care about Windows 9X, should I be worried? Is
> there a better way to display images, hopefully without diving down
> into the device context level?

I would just roll your own control. Its not too complicated. Just
derive from a wxWindow and in your WM_PAINT hander, draw your bitmap.

An alternative may be to place your bitmap in html and use a
wxHtmlWindow to display it.

Will McGugan
--
http://www.willmcgugan.com




More information about the Python-list mailing list