mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-34936: Fix TclError in tkinter.Spinbox.selection_element(). (GH-9760)
This commit is contained in:
parent
bbd90e4f62
commit
1deea5e539
3 changed files with 14 additions and 5 deletions
|
@ -4280,7 +4280,7 @@ class Spinbox(Widget, XView):
|
|||
select to commands. If the selection isn't currently in
|
||||
the spinbox, then a new selection is created to include
|
||||
the characters between index and the most recent selection
|
||||
anchor point, inclusive. Returns an empty string.
|
||||
anchor point, inclusive.
|
||||
"""
|
||||
return self.selection("adjust", index)
|
||||
|
||||
|
@ -4288,7 +4288,7 @@ class Spinbox(Widget, XView):
|
|||
"""Clear the selection
|
||||
|
||||
If the selection isn't in this widget then the
|
||||
command has no effect. Returns an empty string.
|
||||
command has no effect.
|
||||
"""
|
||||
return self.selection("clear")
|
||||
|
||||
|
@ -4296,9 +4296,9 @@ class Spinbox(Widget, XView):
|
|||
"""Sets or gets the currently selected element.
|
||||
|
||||
If a spinbutton element is specified, it will be
|
||||
displayed depressed
|
||||
displayed depressed.
|
||||
"""
|
||||
return self.selection("element", element)
|
||||
return self.tk.call(self._w, 'selection', 'element', element)
|
||||
|
||||
def selection_from(self, index):
|
||||
"""Set the fixed end of a selection to INDEX."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue