3 # this shows how to create a new window with a button in it
4 # that can create new windows
12 fred
.label
= Button(fred
,
13 text
="This is window number %d." % self
.windownum
,
14 command
=self
.makeWindow
)
16 self
.windownum
= self
.windownum
+ 1
18 def createWidgets(self
):
19 self
.QUIT
= Button(self
, text
='QUIT', foreground
='red',
21 self
.QUIT
.pack(side
=LEFT
, fill
=BOTH
)
24 self
.hi_there
= Button(self
, text
='Make a New Window',
25 command
=self
.makeWindow
)
26 self
.hi_there
.pack(side
=LEFT
)
28 def __init__(self
, master
=None):
29 Frame
.__init
__(self
, master
)