mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
bpo-39152: add missing ttk.Scale.configure return value (GH-17815)
tkinter.ttk.Scale().configure([name]) now returns a configuration tuple for name or a list thereof for all options. Based on patch Giovanni Lombardo.
This commit is contained in:
parent
b19c0d77e6
commit
5ea7bb25e3
3 changed files with 9 additions and 11 deletions
|
@ -1084,11 +1084,12 @@ class Scale(Widget, tkinter.Scale):
|
|||
|
||||
Setting a value for any of the "from", "from_" or "to" options
|
||||
generates a <<RangeChanged>> event."""
|
||||
if cnf:
|
||||
retval = Widget.configure(self, cnf, **kw)
|
||||
if not isinstance(cnf, (type(None), str)):
|
||||
kw.update(cnf)
|
||||
Widget.configure(self, **kw)
|
||||
if any(['from' in kw, 'from_' in kw, 'to' in kw]):
|
||||
self.event_generate('<<RangeChanged>>')
|
||||
return retval
|
||||
|
||||
|
||||
def get(self, x=None, y=None):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue