tk(n)
π NAME (the assignment, slay)
tk β Manipulate Tk internal state. That's the whole assignment, bestie π
okay so welcome to the tk(n) page from Tk Built-In Commands β this is where Tk spills its internal-state tea ββ¨
β¨ SYNOPSIS (the tl;dr)
tk option ?arg ...?
πΈ DESCRIPTION (the lore, no cap)
The tk command gives you access to miscellaneous elements of Tk's internal state. Most of the information manipulated by this command pertains to the application as a whole, or to a screen or display, rather than to a particular window. The command can take any of a number of different forms depending on the option argument. The legal forms are β and yes, every single one is iconic π:
tk appname ?newName?β the app-name situation. IfnewNameis not specified, this command returns the name of the application (the name that may be used insendcommands to communicate with the application). IfnewNameis specified, then the name of the application is changed tonewName. If the given name is already in use, then a suffix of the form#2or#3is appended in order to make the name unique. The command's result is the name actually chosen. Warning, bestie:newNameshould not start with a capital letter. This will interfere with option processing, since names starting with capitals are assumed to be classes; as a result, Tk may not be able to find some options for the application π If sends have been disabled by deleting thesendcommand, this command will reenable them and recreate thesendcommand.tk busy subcommand ...β this command controls the marking of window hierarchies as βbusyβ, rendering them non-interactive while some other operation is proceeding. For more details see thebusymanual page π«Άtk caret window ?-x x? ?-y y? ?-height height?β sets and queries the caret location for the display of the specified Tk windowwindow. The caret is the per-display cursor location used for indicating global focus (e.g. to comply with Microsoft Accessibility guidelines), as well as for location of the over-the-spot XIM (X Input Methods) or Windows IME windows. If no options are specified, the last values used for setting the caret are returned in option-value pair format.-xand-yrepresent window-relative coordinates, and-heightis the height of the current cursor location, or the height of the specified window if none is given β¨tk inactive ?-displayof window? ?reset?β returns a positive integer, the number of milliseconds since the last time the user interacted with the system. If the-displayofoption is given then the return value refers to the display ofwindow; otherwise it refers to the display of the application's main window.tk inactivewill return-1, if querying the user inactive time is not supported by the system, and in safe interpreters. If the literal stringresetis given as an additional argument, the timer is reset and an empty string is returned. Resetting the inactivity time is forbidden in safe interpreters and will throw an error if tried πtk fontchooser subcommand ...β controls the Tk font selection dialog. For more details see thefontchoosermanual page πtk print windowβ thetk printcommand posts a dialog that allows users to print output from the canvas and text widgets. The printing will be done using platform-native APIs and dialogs where available. For more details see theprintmanual page π₯tk scaling ?-displayof window? ?number?β sets and queries the current scaling factor used by Tk to convert between physical units (for example, points, inches, or millimeters) and pixels. Thenumberargument is a floating point number that specifies the number of pixels per point onwindow's display. If thewindowargument is omitted, it defaults to the main window. If thenumberargument is omitted, the current value of the scaling factor is returned. A βpointβ is a unit of measurement equal to 1/72 inch. A scaling factor of 1.0 corresponds to 1 pixel per point, which is equivalent to a standard 72 dpi monitor. A scaling factor of 1.25 would mean 1.25 pixels per point, which is the setting for a 90 dpi monitor; setting the scaling factor to 1.25 on a 72 dpi monitor would cause everything in the application to be displayed 1.25 times as large as normal. The initial value for the scaling factor is set when the application starts, based on properties of the installed monitor, but it can be changed at any time. Measurements made after the scaling factor is changed will use the new scaling factor, but it is undefined whether existing widgets will resize themselves dynamically to accommodate the new scaling factor. Undefined-behavior alert, fr fr π¨tk sysnotify title? message?β thetk sysnotifycommand creates a platform-specific system notification alert. Its intent is to provide a brief, unobtrusive notification to the user by popping up a window that briefly appears in a corner of the screen. For more details see thesysnotifymanual page π¦tk systray create subcommand...β thetk systraycommand creates an icon in the platform-specific tray. For more details see thesystraymanual page πtk useinputmethods ?-displayof window? ?boolean?β sets and queries the state of whether Tk should use XIM (X Input Methods) for filtering events. The resulting state is returned. XIM is used in some locales (i.e., Japanese, Korean), to handle special input devices. This feature is only significant on X. If XIM support is not available, this will always return0. If thewindowargument is omitted, it defaults to the main window. If thebooleanargument is omitted, the current state is returned. This is turned on by default for the main display πtk windowingsystemβ returns the current Tk windowing system, one ofx11(X11-based),win32(MS Windows), oraqua(macOS Aqua) β
π¦ SEE ALSO (the squad)
the whole squad pulls up: busy(n), fontchooser(n), print(n), send(n), sysnotify(n), systray(n), and winfo(n) π
π KEYWORDS (the tags)
application name, print, send, sysnotify, systray π
okay that's the entire tk(n) glow-up, bestie β this page is from Tk 8.4 and lives in the tk(n) manual, which is the footer energy. mwah πβ¨
π¦ where this page comes from
- alpine 3.23: tk9-doc 9.0.3-r0 Β· TCL
- alpine 3.24: tk9-doc 9.0.3-r2 Β· TCL
- fedora 43: tk 1:9.0.2-1.fc43 Β· TCL AND HPND-Pbmplus AND CC-BY-SA-3.0 AND MIT-open-group AND MIT
- fedora 43: tk 1:9.0.2-1.fc43 Β· TCL AND HPND-Pbmplus AND CC-BY-SA-3.0 AND MIT-open-group AND MIT
- fedora 44: tk 1:9.0.2-1.fc44 Β· TCL AND HPND-Pbmplus AND CC-BY-SA-3.0 AND MIT-open-group AND MIT
- fedora 44: tk 1:9.0.2-1.fc44 Β· TCL AND HPND-Pbmplus AND CC-BY-SA-3.0 AND MIT-open-group AND MIT
- nixos 26.05: tk 9.0.3
- Copyright (c) 1992 The Regents of the University of California
- Copyright (c) 1994-1996 Sun Microsystems, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms