summaryrefslogtreecommitdiff
path: root/Demo/tkinter/matt/packer-simple.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1996-07-30 18:57:18 +0000
committerGuido van Rossum <guido@python.org>1996-07-30 18:57:18 +0000
commit89cb67bb642ee958d9f095728c99e943e994ca54 (patch)
tree24f176f21636ab7b3a5cd1cec9948b4e3a1315ff /Demo/tkinter/matt/packer-simple.py
parentc30e95f4b0fa266df678fe4e307ff6c19a3f9e73 (diff)
downloadcpython-git-89cb67bb642ee958d9f095728c99e943e994ca54.tar.gz
Updated for Python 1.4
Diffstat (limited to 'Demo/tkinter/matt/packer-simple.py')
-rw-r--r--Demo/tkinter/matt/packer-simple.py21
1 files changed, 9 insertions, 12 deletions
diff --git a/Demo/tkinter/matt/packer-simple.py b/Demo/tkinter/matt/packer-simple.py
index 4519a72df4..7773cae65d 100644
--- a/Demo/tkinter/matt/packer-simple.py
+++ b/Demo/tkinter/matt/packer-simple.py
@@ -7,23 +7,20 @@ class Test(Frame):
def createWidgets(self):
# a hello button
- self.QUIT = Button(self, {'text': 'QUIT',
- 'fg': 'red',
- 'command': self.quit})
-
- self.QUIT.pack({'side': 'left', 'fill': 'both'})
+ self.QUIT = Button(self, text='QUIT', foreground='red',
+ command=self.quit)
+ self.QUIT.pack(side=LEFT, fill=BOTH)
+ self.hi_there = Button(self, text='Hello',
+ command=self.printit)
+ self.hi_there.pack(side=LEFT)
- self.hi_there = Button(self, {'text': 'Hello',
- 'command' : self.printit})
- self.hi_there.pack({'side': 'left'})
+ # note how Packer defaults to side=TOP
- # note how Packer defaults to {'side': 'top'}
-
- self.guy2 = Button(self, {'text': 'button 2'})
+ self.guy2 = Button(self, text='button 2')
self.guy2.pack()
- self.guy3 = Button(self, {'text': 'button 3'})
+ self.guy3 = Button(self, text='button 3')
self.guy3.pack()
def __init__(self, master=None):