winfo x
Gives the x position of the left edge of a widget in its parent.
winfo x WINDOW
Description
The position is relative to the inner top left corner of the parent. For a toplevel, it is the position on the screen.
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
> winfo x .f.b
5
Errors
% winfo x
wrong # args: should be "winfo x window"
-errorcode NONE
% winfo x .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