raise(n)
π raise β Tk Built-In Commands π
okay so this is raise(n), a Tk Built-In Command, and it's literally about changing a window's position in the stacking order. Think of the stacking order as the group-chat hierarchy of windows: who's covering whom, who's on top, who's getting buried. Iconic. πͺβ¨
β¨ NAME β¨
raise β Change a window's position in the stacking order.
πͺ SYNOPSIS πͺ
raise window ?aboveThis?
π DESCRIPTION π
okay bestie, here's the vibe check. If you leave out the aboveThis argument, the command raises window so that it sits above all of its siblings in the stacking order. That means it will not be obscured by any siblings, and it will obscure any siblings that overlap it. Main character energy, honestly. π
If aboveThis is specified, then it must be the path name of a window that is either a sibling of window or the descendant of a sibling of window. In this case, the raise command will insert window into the stacking order just above aboveThis β or just above the ancestor of aboveThis that is a sibling of window. And yes, this could end up either raising or lowering window. It's giving plot twist. π
All toplevel windows may be restacked with respect to each other, whatever their relative path names, but the window manager is not obligated to strictly honor requests to restack. So likeβ¦ you can ask, but the WM might not slay. π
On macOS, raising an iconified toplevel window causes it to be deiconified. no cap, that's the macOS moment. π
πΈ EXAMPLE πΈ
Make a button appear to be in a sibling frame that was created after it. This is often necessary when building GUIs in the style where you create your activity widgets first before laying them out on the display:
button .b -text "Hi there!"
pack [frame .f -background blue]
pack [label .f.l1 -text "This is above"]
pack .b -in .f
pack [label .f.l2 -text "This is below"]
raise .b
π¦ SEE ALSO π¦
π KEYWORDS π
obscureraisestacking order
signed off by Tk 3.3, raise(n) β source/version vibes: Tk 3.3, page: raise(n), periodt ππ
π¦ 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
- nixpkgs unstable: tk 9.1.0
- Copyright (c) 1990 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