Tkinter - changing existing Dialog?
claird at lairds.us
Fri Jun 2 03:03:22 CEST 2006
In article <mailman.6401.1149165099.27775.python-list at python.org>,
Michael Yanowitz <m.yanowitz at kearfott.com> wrote:
>2) Change the text of a label or button that is already drawn?
> based on actions taken by the user. Can it be done without destroying
>the present dialog or the objects in it and creating a new one?
root = Tkinter.Tk()
counter = 0
# This is one of several ways one can access the Button's label.
b.configure(text = "The button has been pushed %d time(s)." % counter)
counter += 1
b = Tkinter.Button(root, command = actions)
More information about the Python-list