Need help w/ wxStaticBitmap (novice)

erictodd at texas.net erictodd at texas.net
Fri Feb 16 09:47:00 EST 2001


In article <mailman.982320618.1389.python-list at python.org>, Mike  
Fletcher <mfletch at tpresence.com> 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(
> 			ID_STATICBITMAP
> 		),
> 		'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!

-Eric



More information about the Python-list mailing list