4 sys
.path
.append("/users/mjc4y/projects/python/tkinter/utils")
5 from TkinterUtils
import *
7 # this shows how to create a new window with a button in it that
8 # can create new windows
12 def makeWindow(self
, *args
):
15 fred
.label
= Canvas (fred
, width
="2i", height
="2i")
17 fred
.label
.create_line("0", "0", "2i", "2i")
18 fred
.label
.create_line("0", "2i", "2i", "0")
21 centerWindow(fred
, self
.master
)
23 def createWidgets(self
):
24 self
.QUIT
= QuitButton(self
)
25 self
.QUIT
.pack(side
=LEFT
, fill
=BOTH
)
27 self
.makeWindow
= Button(self
, text
='Make a New Window',
29 command
=self
.makeWindow
)
30 self
.makeWindow
.pack(side
=LEFT
)
32 def __init__(self
, master
=None):
33 Frame
.__init
__(self
, master
)