diff options
author | Guido van Rossum <guido@python.org> | 1996-08-21 23:38:59 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1996-08-21 23:38:59 (GMT) |
commit | c417ef8e57be01d0e2cbb255a0e8bd2fff5c4cd3 (patch) | |
tree | bad6d90ec31761c938337090a6ede93a3632883a /Lib/tkinter | |
parent | c1d50538827f16893f4ccc440ccca8789cb2611c (diff) | |
download | cpython-c417ef8e57be01d0e2cbb255a0e8bd2fff5c4cd3.zip cpython-c417ef8e57be01d0e2cbb255a0e8bd2fff5c4cd3.tar.gz cpython-c417ef8e57be01d0e2cbb255a0e8bd2fff5c4cd3.tar.bz2 |
Added a small test program.
Diffstat (limited to 'Lib/tkinter')
-rwxr-xr-x | Lib/tkinter/Tkinter.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Lib/tkinter/Tkinter.py b/Lib/tkinter/Tkinter.py index cc2316e..5cab21d 100755 --- a/Lib/tkinter/Tkinter.py +++ b/Lib/tkinter/Tkinter.py @@ -1566,6 +1566,25 @@ class Tributton(Button): self['fg'] = self['bg'] self['activebackground'] = self['bg'] +###################################################################### +# Test: + +def _test(): + root = Tk() + label = Label(root, text="Proof-of-existence test for Tk") + label.pack() + test = Button(root, text="Click me!", + command=lambda root=root: root.test.config( + text="[%s]" % root.test['text'])) + test.pack() + root.test = test + quit = Button(root, text="QUIT", command=root.destroy) + quit.pack() + root.mainloop() + +if __name__ == '__main__': + _test() + # Emacs cruft # Local Variables: |