summaryrefslogtreecommitdiffstats
path: root/Tools/pynche/ListViewer.py
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>1998-10-06 18:56:31 (GMT)
committerBarry Warsaw <barry@python.org>1998-10-06 18:56:31 (GMT)
commit56af4448e1be7a7ed244a5f8f1da174da2ca1a76 (patch)
treec43a8f5f29f0a1adb65cc8f8a747ee56d7c73ef3 /Tools/pynche/ListViewer.py
parentad3a67cc84f446ea79307fa6f58f6d4c64e4f9ac (diff)
downloadcpython-56af4448e1be7a7ed244a5f8f1da174da2ca1a76.zip
cpython-56af4448e1be7a7ed244a5f8f1da174da2ca1a76.tar.gz
cpython-56af4448e1be7a7ed244a5f8f1da174da2ca1a76.tar.bz2
Update main window when Update on Click is turned on
Diffstat (limited to 'Tools/pynche/ListViewer.py')
-rw-r--r--Tools/pynche/ListViewer.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/Tools/pynche/ListViewer.py b/Tools/pynche/ListViewer.py
index d7d26fc..2a54f8f 100644
--- a/Tools/pynche/ListViewer.py
+++ b/Tools/pynche/ListViewer.py
@@ -80,7 +80,8 @@ class ListViewer:
self.__uoc.set(1)
self.__uocbtn = Checkbutton(root,
text='Update on Click',
- variable=self.__uoc)
+ variable=self.__uoc,
+ command=self.__toggleupdate)
self.__uocbtn.pack(expand=1, fill=BOTH)
#
# alias list
@@ -115,6 +116,11 @@ class ListViewer:
self.__sb.update_views(red, green, blue)
else:
self.update_yourself(red, green, blue)
+ self.__red, self.__green, self.__blue = red, green, blue
+
+ def __toggleupdate(self, event=None):
+ if self.__uoc.get():
+ self.__sb.update_views(self.__red, self.__green, self.__blue)
def __quit(self, event=None):
sys.exit(0)