add Listbox.activate()

This commit is contained in:
Guido van Rossum 1995-10-11 17:41:00 +00:00
parent b61b28b07d
commit 46f92d2eba
2 changed files with 4 additions and 0 deletions

View 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'))

View 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'))