Need help w/ wxStaticBitmap (novice)

erictodd at erictodd at
Fri Feb 16 09:47:00 EST 2001

In article <mailman.982320618.1389.python-list at>, Mike  
Fletcher <mfletch at> wrote:
> The problem is likely that find window is defined as:
> 	wxWindow* FindWindow(long id)
> So you're getting back a wxWindow pointer/object instead of a
> wxStaticBitmap.  You need to cast it to a wxStaticBitmap (yes, it's ugly to
> have to cast things in Python):
> 	wxPyTypeCast(
> 		self.FindWindowById(
> 		),
> 		'wxStaticBitmap',
> 	).SetBitmap(MyBitmapsFunc(1))
> Haven't tested that, but it sounds right.  No idea, incidentally, why you're
> able to get the other two to work, seems to me they'd require a cast too.
> HTH,
> Mike

Yes, that worked straight out of the box.  I thank you very much--that was 
an incredibly prompt reply!


More information about the Python-list mailing list