summaryrefslogtreecommitdiffstats
path: root/Demo/tkinter/matt/entry-with-shared-variable.py
diff options
context:
space:
mode:
Diffstat (limited to 'Demo/tkinter/matt/entry-with-shared-variable.py')
-rw-r--r--Demo/tkinter/matt/entry-with-shared-variable.py6
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 5eb8c5a..58fdfac 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.