Kaydet (Commit) c417ef8e authored tarafından Guido van Rossum's avatar Guido van Rossum

Added a small test program.

üst c1d50538
......@@ -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:
......
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment