winfo width
Gives the width of a widget in pixels.
winfo width WINDOW
Description
The width that the geometry manager gave the widget at the last layout. A widget that has had no layout gives 1. Call update first for the current value.
Returns
An integer.
Examples
% frame .w -width 30 -height 10
> pack .w
> update
> winfo width .w
30
Errors
% winfo width
wrong # args: should be "winfo width window"
-errorcode NONE
% winfo width .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