mirror of
https://github.com/python/cpython
synced 2026-09-28 01:13:17 +03:00
gh-43457: Tkinter: fix design flaws in wm_attributes() (GH-111404)
* When called with a single argument to get a value, it allow to omit the minus prefix. * It can be called with keyword arguments to set attributes. * w.wm_attributes(return_python_dict=True) returns a dict instead of a tuple (it will be the default in future). * Setting wantobjects to 0 no longer affects the result.
This commit is contained in:
parent
992446dd5b
commit
b4ba0f73d6
6 changed files with 104 additions and 19 deletions
|
|
@ -421,6 +421,15 @@ tkinter
|
|||
:meth:`!tk_busy_current`, and :meth:`!tk_busy_status`.
|
||||
(Contributed by Miguel, klappnase and Serhiy Storchaka in :gh:`72684`.)
|
||||
|
||||
* The :mod:`tkinter` widget method :meth:`!wm_attributes` now accepts
|
||||
the attribute name without the minus prefix to get window attributes,
|
||||
e.g. ``w.wm_attributes('alpha')`` and allows to specify attributes and
|
||||
values to set as keyword arguments, e.g. ``w.wm_attributes(alpha=0.5)``.
|
||||
Add new optional keyword-only parameter *return_python_dict*: calling
|
||||
``w.wm_attributes(return_python_dict=True)`` returns the attributes as
|
||||
a dict instead of a tuple.
|
||||
(Contributed by Serhiy Storchaka in :gh:`43457`.)
|
||||
|
||||
* Add support of the "vsapi" element type in
|
||||
the :meth:`~tkinter.ttk.Style.element_create` method of
|
||||
:class:`tkinter.ttk.Style`.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue