[Tkinter-discuss] Changing image data in ttk does not work

Michael Lange klappnase at web.de
Sun Dec 18 21:24:40 CET 2011


Hi,

Thus spoketh Martin B <spooky.ln at tbs-software.com> 
unto us on Sun, 18 Dec 2011 21:09:52 +0100:

> V Sun, 18 Dec 2011 20:43:52 +0100
> Martin B <spooky.ln at tbs-software.com> napsáno:
> 
> ugly solution i was found for now is 2 PhotoImages.
> 
> if current == 1:
> 	label1.config(image=photoimage1)
> 	label2.config(image=photoimage1)
> 	current=0
> else:
> 	label1.config(image=photoimage2)
> 	label2.config(image=photoimage2)
> 	current=0
> 
> i never use PhotoImage.config() until this test.
> i always used Label.config() for changing

Yes this works, but unfortunately this breaks the pseudo-animated-gif
class I've been using. For now I think I will stick with the
Tkinter.Label, it does not seem to be a problem as long as you don't want
to change the theme on the fly.

Regards

Michael

.-.. .. ...- .   .-.. --- -. --.   .- -. -..   .--. .-. --- ... .--. . .-.

Actual war is a very messy business.  Very, very messy business.
		-- Kirk, "A Taste of Armageddon", stardate 3193.0


More information about the Tkinter-discuss mailing list