winfo rootx
Gives the x position of the left edge of a widget on the screen.
winfo rootx WINDOW
Description
The position includes the position of the toplevel. Call update first for the current value.
Returns
An integer.
Examples
% frame .f -width 40 -height 30
> pack .f
> frame .f.b -width 20 -height 10
> place .f.b -x 5 -y 6
> update
> expr {[winfo rootx .f.b] - [winfo rootx .]}
5
Errors
% winfo rootx
wrong # args: should be "winfo rootx window"
-errorcode NONE
% winfo rootx .nope
bad window path name ".nope"
-errorcode NONE
Facts
- Capability
- None.
- Tcl release
- Tcl 9.1 and 8.6.
- Since
- ztk 1.0.0-beta.1