diff options
author | Guido van Rossum <guido@python.org> | 1999-04-08 15:18:12 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1999-04-08 15:18:12 (GMT) |
commit | 60cc90ec98278f9472d7772d2fea9a68b0a23afc (patch) | |
tree | 86cdb04c5ea3ba85125ecbaa3614865152eb9eb4 /Demo/tkinter | |
parent | 6e9dadc1da632f884dd386fe9febb3a6be34f576 (diff) | |
download | cpython-60cc90ec98278f9472d7772d2fea9a68b0a23afc.zip cpython-60cc90ec98278f9472d7772d2fea9a68b0a23afc.tar.gz cpython-60cc90ec98278f9472d7772d2fea9a68b0a23afc.tar.bz2 |
This demo imported some private code from Matt. Make it cripple along.
Diffstat (limited to 'Demo/tkinter')
-rw-r--r-- | Demo/tkinter/matt/window-creation-w-location.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/Demo/tkinter/matt/window-creation-w-location.py b/Demo/tkinter/matt/window-creation-w-location.py index 7958335..0ec4e09 100644 --- a/Demo/tkinter/matt/window-creation-w-location.py +++ b/Demo/tkinter/matt/window-creation-w-location.py @@ -1,12 +1,19 @@ from Tkinter import * import sys -sys.path.append("/users/mjc4y/projects/python/tkinter/utils") -from TkinterUtils import * +##sys.path.append("/users/mjc4y/projects/python/tkinter/utils") +##from TkinterUtils import * # this shows how to create a new window with a button in it that # can create new windows +class QuitButton(Button): + def __init__(self, master, *args, **kwargs): + if not kwargs.has_key("text"): + kwargs["text"] = "QUIT" + if not kwargs.has_key("command"): + kwargs["command"] = master.quit + apply(Button.__init__, (self, master) + args, kwargs) class Test(Frame): def makeWindow(self, *args): @@ -18,7 +25,7 @@ class Test(Frame): fred.label.create_line("0", "2i", "2i", "0") fred.label.pack() - centerWindow(fred, self.master) + ##centerWindow(fred, self.master) def createWidgets(self): self.QUIT = QuitButton(self) |