beetlebug▾
/

winfo pointerx

Gives the x position of the pointer on the screen.

winfo pointerx WINDOW

Description

The position comes from the last pointer event of the application. ztk does not read the pointer of the platform at other times. With no pointer event, the result is 0.

Returns

An integer.

Examples

% string is integer [winfo pointerx .]
1

Errors

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

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