beetlebug▾
/

winfo viewable

Gives whether a widget and each of its ancestors are mapped.

winfo viewable WINDOW

Description

1 when the widget can be on the screen: the widget and each ancestor up to its toplevel are mapped. A widget in a withdrawn toplevel gives 0.

Returns

0 or 1.

Examples

% frame .v
> pack .v
> update
> winfo viewable .v
1

% toplevel .vt
> wm withdraw .vt
> update
> winfo viewable .vt
0

Errors

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

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