summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1995-08-11 14:21:06 (GMT)
committerGuido van Rossum <guido@python.org>1995-08-11 14:21:06 (GMT)
commit1d59df28ac32e6bcd449255b092b6acd7d31672a (patch)
tree7ff7a95431da815130af3df28b0714dfc3ae820c /Lib
parentabad1cc647a9c8e892829f8066dc85ad3b7c9632 (diff)
downloadcpython-1d59df28ac32e6bcd449255b092b6acd7d31672a.zip
cpython-1d59df28ac32e6bcd449255b092b6acd7d31672a.tar.gz
cpython-1d59df28ac32e6bcd449255b092b6acd7d31672a.tar.bz2
added select_present and select_range to Entry widget
Diffstat (limited to 'Lib')
-rw-r--r--Lib/lib-tk/Tkinter.py5
-rwxr-xr-xLib/tkinter/Tkinter.py5
2 files changed, 10 insertions, 0 deletions
diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py
index f97ee27..1b22100 100644
--- a/Lib/lib-tk/Tkinter.py
+++ b/Lib/lib-tk/Tkinter.py
@@ -1025,6 +1025,11 @@ class Entry(Widget):
self.tk.call(self._w, 'select', 'clear', 'end')
def select_from(self, index):
self.tk.call(self._w, 'select', 'set', index)
+ def select_present(self):
+ return self.tk.getboolean(
+ self.tk.call(self._w, 'select', 'present'))
+ def select_range(self, start, end):
+ self.tk.call(self._w, 'select', 'range', start, end)
def select_to(self, index):
self.tk.call(self._w, 'select', 'to', index)
def view(self, index):
diff --git a/Lib/tkinter/Tkinter.py b/Lib/tkinter/Tkinter.py
index f97ee27..1b22100 100755
--- a/Lib/tkinter/Tkinter.py
+++ b/Lib/tkinter/Tkinter.py
@@ -1025,6 +1025,11 @@ class Entry(Widget):
self.tk.call(self._w, 'select', 'clear', 'end')
def select_from(self, index):
self.tk.call(self._w, 'select', 'set', index)
+ def select_present(self):
+ return self.tk.getboolean(
+ self.tk.call(self._w, 'select', 'present'))
+ def select_range(self, start, end):
+ self.tk.call(self._w, 'select', 'range', start, end)
def select_to(self, index):
self.tk.call(self._w, 'select', 'to', index)
def view(self, index):