have anyone ever create a progressbar using Tkinter and make button flash or place a picture on button.

is this possible with tkinter.
please can anyone tell me or show me how i can do these things???

thank you very much

Recommended Answers

All 3 Replies

You can do it with label and use spaces of the desired background colour. Here is example:

# Tkinter progress bar experiment
# using label and string of spaces

import Tkinter as tk

root = tk.Tk()
# width 300 and height 100, no offsets
root.geometry("300x100+0+0")

space = " "
s = ""
label = tk.Label(root, text=s, bg='blue')
label.pack(anchor='nw')

for k in range(80):
    s += space
    # increments every 100 milliseconds
    label.after(100,label.config(text=s))
    label.update()  # needed

root.mainloop()
commented: nice and polite +7

thank you its good but i want that after the completion the progessbar disappear.
is it possible???
can you tel me how i can do it????

thank you in advance...

You could do it with something like
label.config(bg='white')

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.