winfo containing
Gives the widget at a point of the screen.
winfo containing ?-displayof WINDOW? ROOTX ROOTY
Description
Gives the deepest widget of the application that contains the point ROOTX ROOTY, in coordinates of the screen. A point outside each window of the application gives an empty string.
Returns
A widget name, or an empty string.
Examples
% frame .f -width 40 -height 30
> pack .f
> frame .f.b -width 20 -height 10
> place .f.b -x 5 -y 6
> update
> winfo containing [winfo rootx .f.b] [winfo rooty .f.b]
.f.b
% winfo containing -100000 -100000
Errors
% winfo containing 1 2 3
wrong # args: should be "winfo containing ?-displayof window? rootX rootY"
-errorcode TCL WRONGARGS
% winfo containing x 1
expected integer but got "x"
-errorcode TCL VALUE NUMBER
Facts
- Capability
- None.
- Tcl release
- Tcl 9.1 and 8.6.
- Since
- ztk 1.0.0-beta.1