beetlebug▾
/

winfo screenwidth

Gives the width of the screen in pixels.

winfo screenwidth WINDOW

Description

The width of the screen of the toplevel of WINDOW.

Returns

An integer.

Examples

% expr {[winfo screenwidth .] > 0}
1

Errors

% winfo screenwidth
wrong # args: should be "winfo screenwidth window"
-errorcode NONE

% winfo screenwidth .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