954,546 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

button flash,progressbar

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

nish88
Light Poster
46 posts since Nov 2007
Reputation Points: 10
Solved Threads: 0
 

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()
bumsfeld
Nearly a Posting Virtuoso
1,445 posts since Jul 2005
Reputation Points: 404
Solved Threads: 184
 

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...

nish88
Light Poster
46 posts since Nov 2007
Reputation Points: 10
Solved Threads: 0
 

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

vegaseat
DaniWeb's Hypocrite
Moderator
5,989 posts since Oct 2004
Reputation Points: 1,345
Solved Threads: 1,417
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You