tkinter canvas bitmaps w/ xbm formated string data?

Peter Otten __peter__ at web.de
Sat Aug 14 15:49:39 EDT 2004


Brett wrote:

> I'm trying to load a xbm formatted string as a bitmap and draw it to a
> canvas....I don't have any trouble with loading/displaying xbm files,
> it's when I've pre-created the xbm as a string I get a 'can't find
> your bitmap error'

> ...I have a feeling that I somehow lost a reference to my bitmap
> object...I'm not sure what's happening.
> 
> any ideas what could be wrong?

No, but

canvas.create_image(100, 100, image=a_bitmap)

instead of

> canvas.create_bitmap(100,100, bitmap=a_bitmap)  #if I used

seems to work.

Peter






More information about the Python-list mailing list