mirror of
https://github.com/python/cpython.git
synced 2025-07-23 03:05:38 +00:00
add Listbox.activate()
This commit is contained in:
parent
b61b28b07d
commit
46f92d2eba
2 changed files with 4 additions and 0 deletions
|
@ -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'))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue