3 # This is a program that makes a simple two button application
6 class New_Button(Button
):
9 self
.counter
= self
.counter
+ 1
11 def createWidgets(top
):
14 f
.QUIT
= Button(f
, {'text': 'QUIT',
18 f
.QUIT
.pack({'side': 'left', 'fill': 'both'})
22 f
.hi_there
= New_Button(f
, {'text': 'Hello'})
23 # we do this on a different line because we need to reference f.hi_there
24 f
.hi_there
.config({'command' : f
.hi_there
.callback
})
25 f
.hi_there
.pack({'side': 'left'})
26 f
.hi_there
.counter
= 43