From: Guido van Rossum Date: Wed, 11 Oct 1995 17:41:00 +0000 (+0000) Subject: add Listbox.activate() X-Git-Tag: v1.3~15 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=46f92d2ebab2830d69277121cffef690679ed268;p=thirdparty%2FPython%2Fcpython.git add Listbox.activate() --- diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py index 170339534efb..aace39a0636a 100644 --- a/Lib/lib-tk/Tkinter.py +++ b/Lib/lib-tk/Tkinter.py @@ -1031,6 +1031,8 @@ class Listbox(Widget): self['selectmode'] = 'single' else: self.tk.call('tk_listboxSingleSelect', self._w) + def activate(self, index): + self.tk.call(self._w, 'activate', index) def curselection(self): return self.tk.splitlist(self.tk.call( self._w, 'curselection')) diff --git a/Lib/tkinter/Tkinter.py b/Lib/tkinter/Tkinter.py index 170339534efb..aace39a0636a 100755 --- a/Lib/tkinter/Tkinter.py +++ b/Lib/tkinter/Tkinter.py @@ -1031,6 +1031,8 @@ class Listbox(Widget): self['selectmode'] = 'single' else: self.tk.call('tk_listboxSingleSelect', self._w) + def activate(self, index): + self.tk.call(self._w, 'activate', index) def curselection(self): return self.tk.splitlist(self.tk.call( self._w, 'curselection'))