Name

winfo

winfo operation [arg arg...]

The winfo command provides information about the windows managed by Tk. The following operations are supported:

winfo atom [-displayof window name]

Return as a decimal string the identifier for the atom named name on window’s display.

winfo atomname [-displayof window id]

Return the textual name of the atom on window’s display whose integer identifier is id.

winfo cells window

Return the number of cells in the colormap of window.

winfo children window

Return a list of the pathnames of all children of window, in stacking order.

winfo class window

Return the class name for window.

winfo colormapfull window

Return 1 if the colormap for window is known to be full (the last attempt to allocate a new color failed and this application has not freed any), 0 otherwise.

winfo containing [-displayof window ] rootX rootY

Return the pathname of the window containing the point rootX and rootY in the root window of window’s display. If multiple windows contain the point, children are given higher priority than parents. Among siblings, the highest one in the stacking order has priority.

winfo depth window

Return the depth of window (number of bits per pixel).

winfo exists window

Return 1 if a window named window exists, 0 otherwise.

winfo fpixels window size

Return as a floating-point value the number of pixels in window corresponding to the distance size in screen units.

winfo geometry window

Return the geometry for window in the X geometry specification form widthxheight+x+y

Get Tcl/Tk in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.