ttk label doesn't behave properly
<p>A ttk Label which contains a bitmap image doesn't behave properly when I change the image's foreground color. Only ttk Labels have this problem. Tkinter labels works properly.</p>

<p>Here is the code:</p>

<pre><code>import tkinter as tk
import tkinter.ttk as ttk

BITMAP0 = """
#define zero_width 24
#define zero_height 32
static char zero_bits[] = {
0x00,0x00,0x00, 0x00,0x00,0x00, 0xf0,0x3c,0x0f, 0xf0,0x3c,0x0f,
0xf0,0x3c,0x0f, 0xf0,0x3c,0x0f, 0x00,0x00,0x00, 0x00,0x00,0x00,
0xf0,0x00,0x0f, 0xf0,0x00,0x0f, 0xf0,0x00,0x0f, 0xf0,0x00,0x0f,
0x00,0x00,0x00, 0x00,0x00,0x00, 0xf0,0x00,0x0f, 0xf0,0x00,0x0f,
0xf0,0x00,0x0f, 0xf0,0x00,0x0f, 0x00,0x00,0x00, 0x00,0x00,0x00,
0xf0,0x00,0x0f, 0xf0,0x00,0x0f, 0xf0,0x00,0x0f, 0xf0,0x00,0x0f,
0x00,0x00,0x00, 0x00,0x00,0x00, 0xf0,0x3c,0x0f, 0xf0,0x3c,0x0f,
0xf0,0x3c,0x0f, 0xf0,0x3c,0x0f, 0x00,0x00,0x00, 0x00,0x00,0x00
};
"""

root = tk.Tk()

img = tk.BitmapImage(data=BITMAP0, foreground='Lime', background='Black')

label = ttk.Label(root, image=img)
label.pack()

color = ['red', 'yellow', 'lime', 'white']

def change_color(n):
    img.config(foreground=color[n])
    if n == 3:
        root.after(1000, change_color, 0)
    else:
        root.after(1000, change_color, n+1)

root.after(1000, change_color, 0)

root.mainloop()
</code></pre>

<p>The image's foreground color should change every second, it doesn't, unless you fly over the image with the mouse.
Just replace the line:</p>

<pre><code>label = ttk.Label(root, image=img)
</code></pre>

<p>with:</p>

<pre><code>label = tk.Label(root, image=img)
</code></pre>

<p>and the program works.
Any help would be appreciated.</p>

<p>I am using python 3.5 with windows Vista</p>

<p>Try to reassign the changed image to label:</p>

<pre><code>def change_color(n):
    img.config(foreground=color[n%4])
    label.config(image=img) # reassign the changed image to label
    root.after(1000, change_color, n+1)
</code></pre>

python python-3.x tkinter ttk