Tk_SetGrid(3)
π NAME π
Okay bestie, welcome to Tk_SetGrid(3) from the Tk Library Procedures corner of the universe β¨ This page is all about Tk_SetGrid and Tk_UnsetGrid β the duo that controls the grid for interactive resizing. Periodt. π«Ά
β¨ SYNOPSIS β¨
#include <tk.h>
Tk_SetGrid(tkwin, reqWidth, reqHeight, widthInc, heightInc)
Tk_UnsetGrid(tkwin)
π ARGUMENTS π
Tk_Window tkwin(in) β Token for window. The little handle for the window in question, iykyk πint reqWidth(in) β Width in grid units that corresponds to the pixel dimensiontkwinhas requested viaTk_GeometryRequest.int reqHeight(in) β Height in grid units that corresponds to the pixel dimensiontkwinhas requested viaTk_GeometryRequest.int widthInc(in) β Width of one grid unit, in pixels.int heightInc(in) β Height of one grid unit, in pixels.
π¦ DESCRIPTION π¦
So Tk_SetGrid turns on gridded geometry management for tkwin's toplevel window and specifies the geometry of the grid. It is typically invoked by a widget when its setGrid option is true. No cap. π
It restricts interactive resizing of tkwin's toplevel window so that the space allocated to the toplevel is equal to its requested size plus or minus even multiples of widthInc and heightInc. Furthermore, the reqWidth and reqHeight values are passed to the window manager so that it can report the window's size in grid units during interactive resizes. If tkwin's configuration changes (e.g., the size of a grid unit changes) then the widget should invoke Tk_SetGrid again with the new information. Slay, keep it updated π
Tk_UnsetGrid cancels gridded geometry management for tkwin's toplevel window. Bye-bye grid mode, bestie π
For each toplevel window there can be at most one internal window with gridding enabled. Highkey important. If Tk_SetGrid or Tk_UnsetGrid is invoked when some other window is already controlling gridding for tkwin's toplevel, the calls for the new window have no effect.
πΈ Heads-up, bestie: if another window already has gridding control for that toplevel, the new windowβsTk_SetGrid/Tk_UnsetGridcalls literally do nothing. Itβs giving βnot my main character momentβ π
See the wm manual entry for additional information on gridded geometry management. Go read it, iykyk πβ¨
π₯ KEYWORDS π₯
grid, window, window manager π
π Signed off from the Tk Library Procedures corner: Tk 4.0, Tk_SetGrid(3) β no date listed on this page, bestie, so thatβs the whole footer tea π«β¨
π¦ 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-devel 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-devel 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-devel 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-devel 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
- nixpkgs unstable: tk 9.1.0
- Copyright (c) 1990-1994 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