]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
add Listbox.activate()
authorGuido van Rossum <guido@python.org>
Wed, 11 Oct 1995 17:41:00 +0000 (17:41 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 11 Oct 1995 17:41:00 +0000 (17:41 +0000)
Lib/lib-tk/Tkinter.py
Lib/tkinter/Tkinter.py

index 170339534efbe6e117be975dc3f98a9f7a73840c..aace39a0636ad233d3de6a0a8c0f03b08247e452 100644 (file)
@@ -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'))
index 170339534efbe6e117be975dc3f98a9f7a73840c..aace39a0636ad233d3de6a0a8c0f03b08247e452 100755 (executable)
@@ -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'))