summaryrefslogtreecommitdiff
path: root/Lib/tkinter/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/tkinter/__init__.py')
-rw-r--r--Lib/tkinter/__init__.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/tkinter/__init__.py b/Lib/tkinter/__init__.py
index beb0a73d00..c8d806137e 100644
--- a/Lib/tkinter/__init__.py
+++ b/Lib/tkinter/__init__.py
@@ -391,6 +391,11 @@ class BooleanVar(Variable):
"""
Variable.__init__(self, master, value, name)
+ def set(self, value):
+ """Set the variable to VALUE."""
+ return self._tk.globalsetvar(self._name, self._tk.getboolean(value))
+ initialize = set
+
def get(self):
"""Return the value of the variable as a bool."""
try: