summaryrefslogtreecommitdiffstats
path: root/Lib/tkinter
Commit message (Collapse)AuthorAgeFilesLines
* gh-126899: Add `**kw` to `tkinter.Misc.after` and `tkinter.Misc.after_idle` ↵Zhikang Yan2024-12-011-4/+4
| | | | | | | (#126900) --------- Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-124111: Update tkinter for compatibility with Tcl/Tk 9.0.0 (GH-124156)Marc Culler2024-11-141-0/+2
|
* gh-123341: Support `tkinter.Event` type subcript (#123353)Yoda2024-09-011-0/+2
| | | | | Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
* Fix typos in comments (#123201)Wulian2024-08-211-1/+1
|
* gh-121905: Consistently use "floating-point" instead of "floating point" ↵Serhiy Storchaka2024-07-191-1/+1
| | | | (GH-121907)
* gh-120211: Fix tkinter.ttk with Tcl/Tk 9.0 (GH-120213)Serhiy Storchaka2024-06-071-3/+6
| | | | * Use new methods for tracing Tcl variable. * Fix Combobox.current() for empty combobox.
* gh-118760: Restore the default value of tkinter.wantobjects to 1 (GH-118784)Serhiy Storchaka2024-05-201-1/+1
| | | | It was set to 2 in 65f5e586a1239ed1a66d8284773d7b02ce40e480 (GH-98592).
* gh-118760: Fix errors in calling Tkinter bindings on Windows (GH-118782)Serhiy Storchaka2024-05-151-0/+3
| | | | For unknown reasons some arguments for Tkinter binding can be created as a 1-tuple containing a Tcl_Obj when wantobjects is 2.
* gh-66410: Do not stringify arguments of Tkinter callback (GH-98592)Serhiy Storchaka2024-05-071-2/+5
| | | | | | | | | Callbacks registered in the tkinter module now take arguments as various Python objects (int, float, bytes, tuple), not just str. To restore the previous behavior set tkinter module global wantobject to 1 before creating the Tk object or call the wantobject() method of the Tk object with argument 1. Calling it with argument 2 restores the current default behavior.
* gh-71592: Add ability to trace Tcl commands executed by Tkinter (GH-118291)Serhiy Storchaka2024-05-061-4/+15
| | | | | | | | | | | | This is an experimental feature, for internal use. Setting tkinter._debug = True before creating the root window enables printing every executed Tcl command (or a Tcl command equivalent to the used Tcl C API). This will help to convert a Tkinter example into Tcl script to check whether the issue is caused by Tkinter or exists in the underlying Tcl/Tk library.
* gh-118271: Support more options for reading/writing images in Tkinter ↵Serhiy Storchaka2024-05-061-11/+111
| | | | | | | | (GH-118273) * Add PhotoImage.read() to read an image from a file. * Add PhotoImage.data() to get the image data. * Add background and grayscale parameters to PhotoImage.write().
* gh-118225: Support more options for copying images in Tkinter (GH-118228)Serhiy Storchaka2024-05-061-16/+95
| | | | | | | | * Add the PhotoImage method copy_replace() to copy a region from one image to other image, possibly with pixel zooming and/or subsampling. * Add from_coords parameter to PhotoImage methods copy(), zoom() and subsample(). * Add zoom and subsample parameters to PhotoImage method copy().
* bpo-32839: Add the after_info() method for Tkinter widgets (GH-5664)Cheryl Sabella2024-04-261-0/+15
|
* gh-116484: Fix collisions between Checkbutton and ttk.Checkbutton default ↵Serhiy Storchaka2024-03-161-1/+6
| | | | | | | | names (GH-116495) Change automatically generated tkinter.Checkbutton widget names to avoid collisions with automatically generated tkinter.ttk.Checkbutton widget names within the same parent widget.
* gh-97928: Partially restore the behavior of tkinter.Text.count() by default ↵Serhiy Storchaka2024-02-111-8/+15
| | | | | | | | | | | | | (GH-115031) By default, it preserves an inconsistent behavior of older Python versions: packs the count into a 1-tuple if only one or none options are specified (including 'update'), returns None instead of 0. Except that setting wantobjects to 0 no longer affects the result. Add a new parameter return_ints: specifying return_ints=True makes Text.count() always returning the single count as an integer instead of a 1-tuple or None.
* gh-43457: Tkinter: fix design flaws in wm_attributes() (GH-111404)Serhiy Storchaka2024-02-052-20/+33
| | | | | | | | | * 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.
* gh-113951: Tkinter: "tag_unbind(tag, sequence, funcid)" now only unbinds ↵Serhiy Storchaka2024-02-041-11/+15
| | | | | | | | | | | "funcid" (GH-113955) Previously, "tag_unbind(tag, sequence, funcid)" methods of Text and Canvas widgets destroyed the current binding for "sequence", leaving "sequence" unbound, and deleted the "funcid" command. Now they remove only "funcid" from the binding for "sequence", keeping other commands, and delete the "funcid" command. They leave "sequence" unbound only if "funcid" was the last bound command.
* gh-110345: show Tcl/Tk patchlevel in `tkinter._test()` (GH-110350)Christopher Chavez2024-01-181-1/+1
|
* gh-113877: Fix Tkinter method winfo_pathname() on 64-bit Windows (GH-113900)Serhiy Storchaka2024-01-101-0/+2
| | | | | winfo_id() converts the result of "winfo id" command to integer, but "winfo pathname" command requires an argument to be a hexadecimal number on Win64.
* gh-75666: Tkinter: "unbind(sequence, funcid)" now only unbinds "funcid" ↵Serhiy Storchaka2023-12-061-4/+18
| | | | | | | | | | | | | (GH-111322) Previously, "widget.unbind(sequence, funcid)" destroyed the current binding for "sequence", leaving "sequence" unbound, and deleted the "funcid" command. Now it removes only "funcid" from the binding for "sequence", keeping other commands, and deletes the "funcid" command. It leaves "sequence" unbound only if "funcid" was the last bound command. Co-authored-by: GiovanniL <13402461+GiovaLomba@users.noreply.github.com>
* gh-68166: Add support of "vsapi" in ttk.Style.element_create() (GH-111393)Serhiy Storchaka2023-11-271-24/+31
|
* gh-111531: Tkinter: fix reference leaks in bind_class() and bind_all() ↵Serhiy Storchaka2023-10-311-2/+2
| | | | (GH-111533)
* gh-97928: Change the behavior of tkinter.Text.count() (GH-98484)Serhiy Storchaka2023-10-241-13/+16
| | | | | | | It now always returns an integer if one or less counting options are specified. Previously it could return a single count as a 1-tuple, an integer (only if option "update" was specified) or None if no items found. The result is now the same if wantobjects is set to 0.
* gh-72684: Tkinter: provide interface for "tk busy" subcommands (GH-107684)Serhiy Storchaka2023-08-191-0/+79
| | | | Add tkinter.Misc methods: tk_busy_hold(), tk_busy_configure(), tk_busy_cget(), tk_busy_forget(), tk_busy_current(), and tk_busy_status().
* gh-100814: Fix exception for invalid callable value of Tkinter image option ↵Serhiy Storchaka2023-08-071-4/+0
| | | | | | | (GH-107692) Passing a callable object as an option value to a Tkinter image now raises the expected TclError instead of an AttributeError.
* gh-75552: Remove deprecated tkinter.tix module (GH-104902)Zachary Ware2023-05-271-1948/+0
|
* gh-94473: Flatten arguments in tkinter.Canvas.coords() (GH-98479)Serhiy Storchaka2023-05-221-1/+1
| | | | | It now accepts not only "x1, y1, x2, y2, ..." and "[x1, y1, x2, y2, ...]", but also "(x1, y1), (x2, y2), ..." and "[(x1, y1), (x2, y2), ...]".
* gh-103685: Fix tkinter.Menu.index() for Tk 8.7 (#103686)Christopher Chavez2023-04-241-2/+1
| | | | | | --------- Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
* gh-102799: use exception instance instead of sys.exc_info() (#102885)Irit Katriel2023-03-311-3/+2
|
* gh-102778: Add sys.last_exc, deprecate sys.last_type, ↵Irit Katriel2023-03-181-0/+1
| | | | sys.last_value,sys.last_traceback (#102779)
* gh-57762: fix misleading tkinter.Tk docstring (#98837)Shantanu2022-12-221-1/+1
| | | | Mentioned as a desired change by terryjreedy on the corresponding issue, since Tk is not a subclass of Toplevel.
* gh-97928: Fix handling options starting with "-" in tkinter.Text.count() ↵Serhiy Storchaka2022-10-191-1/+1
| | | | | (GH-98436) Previously they were silently ignored. Now they are errors.
* gh-73588: Fix generation of the default name of tkinter.Checkbutton. (GH-97547)Serhiy Storchaka2022-09-273-3/+13
| | | | | | Previously, checkbuttons in different parent widgets could have the same short name and share the same state if arguments "name" and "variable" are not specified. Now they are globally unique.
* gh-54781: Move Lib/tkinter/test/test_ttk/ to Lib/test/test_ttk/ (#94070)Victor Stinner2022-06-2220-6771/+0
| | | | | | | | | | * Move Lib/tkinter/test/test_tkinter/ to Lib/test/test_tkinter/. * Move Lib/tkinter/test/test_ttk/ to Lib/test/test_ttk/. * Add Lib/test/test_ttk/__init__.py based on test_ttk_guionly.py. * Add Lib/test/test_tkinter/__init__.py * Remove old Lib/test/test_tk.py. * Remove old Lib/test/test_ttk_guionly.py. * Add __main__ sub-modules. * Update imports and update references to rename files.
* gh-84623: Remove unused imports (#94132)Victor Stinner2022-06-222-2/+0
|
* gh-84623: Remove unused imports in stdlib (#93773)Victor Stinner2022-06-131-1/+1
|
* bpo-13553: Document tkinter.Tk args (#4786)Cheryl Sabella2022-05-101-4/+4
|
* gh-91827: Add method info_pathlevel() in tkinter (GH-91829)Serhiy Storchaka2022-05-064-10/+59
|
* bpo-46996: Remove support of Tcl/Tk < 8.5.12 (GH-31839)Serhiy Storchaka2022-03-175-141/+57
|
* bpo-45979: Fix Tkinter tests with old Tk (>= 8.5.12) (GH-31938)Serhiy Storchaka2022-03-162-3/+5
|
* bpo-45496: Allow flexibility in winfo_rgb tests (GH-30185)E-Paine2021-12-261-2/+9
|
* bpo-27313: Use non-deprecated methods for tracing (GH-29425)Serhiy Storchaka2021-11-061-5/+5
|
* bpo-27313: Fix ttk_guionly tests failing on Framework builds on macOS (GH-29411)Łukasz Langa2021-11-051-46/+20
|
* bpo-45160: Fix refleak in test_ttk_guionly introduced in GH-28291 (GH-29416)Łukasz Langa2021-11-051-1/+4
|
* bpo-45160: Ttk optionmenu only set variable once (GH-28291)E-Paine2021-10-212-1/+17
|
* Cleanup a couple of comments left on PR 28775 post-merge. (GH-29079)Gregory P. Smith2021-10-201-1/+1
|
* bpo-45436: Fix tkinter tests with Tcl/Tk 8.6.11+ (GH-29077)Zachary Ware2021-10-202-5/+11
| | | | | | | Since v8.6.11, a few configuration options seem to accept an empty value where they did not previously; particularly the `type` of a `Menu` widget, and the `compound` of any ttk widget with a label. Providing an explicit expected error message to `checkEnumParam` bypasses the check of an empty value, which no longer raises `TclError`.
* bpo-45229: Make tkinter tests discoverable (GH-28637)Serhiy Storchaka2021-10-1314-572/+19
|
* Fix typos in the Lib directory (GH-28775)Christian Clauss2021-10-062-4/+4
| | | | | Fix typos in the Lib directory as identified by codespell. Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* bpo-25130: Add calls of gc.collect() in tests to support PyPy (GH-28005)Serhiy Storchaka2021-08-294-2/+17
|