[Tutor] removing an image from a tkinter label

Orri Ganel singingxduck at gmail.com
Thu Nov 16 00:59:03 CET 2006


Alan Gauld wrote:

>"Orri Ganel" <singingxduck at gmail.com> wrote
>
>  
>
>>In the end, setting lbl["image"] = "" worked 
>>    
>>
>
>Glad it worked. I was just about to suggest creating an image 
>with the "No image" text in it. You could then just display that 
>as the default image...
>
>Alan G.
>
>
>
>_______________________________________________
>Tutor maillist  -  Tutor at python.org
>http://mail.python.org/mailman/listinfo/tutor
>
>  
>
 From what I found, it seems that one version of the documentation 
(perhaps the original Tcl documentation, as I found no mention of it on 
effbot) actually says to set it equal to an empty string to return to 
whatever text is in the label (images take precedence over text).  I 
think setting it equal to another string might have the same effect as 
setting it equal to None - a TclError.  Incidentally, if anyone's 
interested in the working product (I won't call it final for a while 
yet), let me know and I can give you a link to the code.

Orri G.


More information about the Tutor mailing list