Differences from Tk

ztk follows the widgets of Tk 8.6.16, with some commands of Tk 8.7 and 9. A script that runs in wish 8.6 runs in ztk when it uses the widgets and the commands that ztk has, also on Tcl 9.1 when the script has no difference of the language (below). This page lists what a script can see that differs, what is in progress, and what ztk leaves out on purpose. It was checked against ztk main on 2026-11-27. The full list, with each option and each test, is the limits file.

Tcl and Tk releases

The ztk program, a program of ztk bundle, and the web build run a script on Tcl 9.1 by default, as the ztcl runner does, and report Tk 9.1.0 (tk_version 9.1, package require Tk 9.1.0, also as the package tk). Run a script of Tcl and Tk 8.6 with ztk --tcl 8.6, ZTCL_TCL=8.6, or ztk bundle --tcl 8.6: it then reports Tcl 8.6 and Tk 8.6.16. A bundled app keeps the release of its build. libztk, the drop-in libtk8.6, stays at 8.6.

The release changes the language: an integer with a leading zero is decimal, a bad byte in an encoding is an error, and the other changes of Tcl 9.1 and Tcl 8.6. The widgets of ztk are the same in both releases: the widget changes of Tk 9.0 and 9.1, such as ttk::toggleswitch, the screen reader support, and right-to-left text, are not in ztk yet.

Platforms

Each platform has a native backend of its own, with no toolkit library between ztk and the system.

Platform Window and renderer What the system gives a script Reference
Linux, Wayland The Wayland client of ztk, Vulkan into dma-bufs or the CPU renderer The clipboard, drops and drags, tray icons, file dialogs through the portal, full screen, window icons, less motion On Linux
Linux, X11 The X11 client of ztk with the CPU renderer, for a desktop with no Wayland compositor One window, the keys, the pointer, and window icons. No clipboard, no popups, and no input method yet On Linux
macOS 13 and later AppKit and Metal, with live resize Native menus and dialogs, Core Text with SF Pro, drops and drags, tray, the Dock menu and badge, window tabs, full screen On macOS
Windows 10 and 11 Win32 and Direct3D 12 Native menus and dialogs, DirectWrite with Segoe UI Variable, the Fluent look, drops and drags, tray, taskbar, jump list, global shortcuts On Windows
The web WebGPU, WebGL 2, or a 2D canvas, in WebAssembly One window (.) on a canvas. A second toplevel has no canvas On the web
No display The headless backend with the CPU renderer Screenshots and input for tests and agents For agents

ztk::has tells a script which platform features this program has (ztk::has).

Missing today

Feature of Tk State in ztk Issue
send Not in ztk. #257
Event sequences of more than one event, such as <Control-x><Control-s> bind gives an error. #256
Text peers (text peer create) peer names gives an empty list, and peer create gives an error. #249
canvas postscript Gives an error. #181
Rotated canvas text (-angle) The option is stored, and the text renders level.
Tk in a child interpreter (load {} Tk child) Not in ztk. One app has one Tk.
selection with other apps The selection works inside the app only. The clipboard is the clipboard of the system on Windows, macOS, and Wayland, and local to the app on X11 and the web.
tk busy Keeps the busy mark of a window and does not block its input.
tk fontchooser Keeps its options and shows no dialog.
Bold monospace text ztk has the regular face of JetBrains Mono only, so {TkFixedFont 9 bold} renders in the regular weight. #300

In progress

Differences that a script can see

Text and fonts

Windows

The look

Styles and themes

Behavior

Absent by design

Additions

ztk adds these commands and options. The ztk:: commands lists the reference page of each.