diff options
author | Guido van Rossum <guido@python.org> | 1996-07-30 18:57:18 +0000 |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1996-07-30 18:57:18 +0000 |
commit | 89cb67bb642ee958d9f095728c99e943e994ca54 (patch) | |
tree | 24f176f21636ab7b3a5cd1cec9948b4e3a1315ff /Demo/tkinter/matt/entry-with-shared-variable.py | |
parent | c30e95f4b0fa266df678fe4e307ff6c19a3f9e73 (diff) | |
download | cpython-git-89cb67bb642ee958d9f095728c99e943e994ca54.tar.gz |
Updated for Python 1.4
Diffstat (limited to 'Demo/tkinter/matt/entry-with-shared-variable.py')
-rw-r--r-- | Demo/tkinter/matt/entry-with-shared-variable.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Demo/tkinter/matt/entry-with-shared-variable.py b/Demo/tkinter/matt/entry-with-shared-variable.py index 5eb8c5ae62..58fdfac58c 100644 --- a/Demo/tkinter/matt/entry-with-shared-variable.py +++ b/Demo/tkinter/matt/entry-with-shared-variable.py @@ -11,10 +11,10 @@ class App(Frame): self.entrythingy = Entry() self.entrythingy.pack() - self.button = Button(self, {"text" : "Uppercase The Entry", "command" : self.upper}) + self.button = Button(self, text="Uppercase The Entry", + command=self.upper) self.button.pack() - # here we have the text in the entry widget tied to a variable. # changes in the variable are echoed in the widget and vice versa. # Very handy. @@ -22,7 +22,7 @@ class App(Frame): # the other variable types that can be shadowed self.contents = StringVar() self.contents.set("this is a variable") - self.entrythingy.config({"textvariable":self.contents}) + self.entrythingy.config(textvariable=self.contents) # and here we get a callback when the user hits return. we could # make the key that triggers the callback anything we wanted to. |