raise
Moves a widget above its siblings in the stacking order.
raise WINDOW ?ABOVETHIS?
Description
Each container keeps its children in a stacking order. A widget higher in the order is drawn on top of a lower one where the two overlap, such as two widgets of place at the same position. winfo children gives the children from the bottom of the order to the top.
With no ABOVETHIS, WINDOW goes to the top of the order of its siblings. With ABOVETHIS, WINDOW goes just above it. ABOVETHIS is a sibling of WINDOW or a descendant of a sibling. For a toplevel, raise moves its platform window above the other windows of the application.
Returns
An empty string.
Examples
% frame .r1
> frame .r2
> frame .r3
> foreach w {.r1 .r2 .r3} { place $w -x 0 -y 0 }
> raise .r1
> winfo children .
.r2 .r3 .r1
% raise .r3 .r2
> winfo children .
.r2 .r3 .r1
% raise .r2 .r1
> winfo children .
.r3 .r1 .r2
Errors
% raise
wrong # args: should be "raise window ?aboveThis?"
-errorcode NONE
% raise .nope
bad window path name ".nope"
-errorcode NONE
% frame .r4
> raise .r4 .nope
bad window path name ".nope"
-errorcode NONE
Differences from Tcl
- The errors of
raisehave the-errorcodeNONE. Tk 8.6.16 givesTCL WRONGARGSorTK LOOKUP WINDOW.
Facts
- Capability
- None.
- Tcl release
- Tcl 9.1 and 8.6.
- Since
- ztk 1.0.0-beta.1