Need help w/ wxStaticBitmap (novice)

Eric Myers erictodd at texas.net
Fri Feb 16 00:51:10 EST 2001


Hello.  Using wxDesigner, I've created a small dialog (dialer_wdr.py) whose 
job is to change as it catches certain events.  The contents of the dialog 
are as follows:
-A button, whose Id is ID_BUTTON
-A static text box whose Id is ID_TEXT
-A static bitmap whose Id is ID_STATICBITMAP, and whose initial bitmap is 
MyBitmapsFunc(0)

The event-catching and dialog-changing is handled by my implementation 
file,  which is named dialer.py.  When the event referred to is detected, 
dialer.py executes the following:

self.FindWindowById(ID_TEXT).SetLabel("new text")
--and the static text successfully gets changed to "new text"

self.FindWindowById(ID_BUTTON).SetLabel("new caption")
--and the button's caption successfully gets changed

self.FindWindowById(ID_STATICBITMAP).SetBitmap(MyBitmapsFunc(1))
--and I get an error that says "AttributeError: 'wxWindowPtr' instance has 
no attribute 'SetBitmap'"

I don't understand why this technique works in the first two situations but 
gives me problems with the bitmap thing.  If for some reason I can't 
accomplish what I'm trying to do in this way, can somebody please point me 
in the right direction?

                            Thanks




More information about the Python-list mailing list