winfo()

DESCRIPTION

The winfo() method is used to retrieve information about windows managed by Tkinter. It can take any of a number of different forms. The legal forms are:

window.winfo_cells()
Returns a decimal string giving the number of cells in the color map for window.

window.winfo_class()
Returns the class name for window.

window.winfo_depth()
Returns a decimal string giving the depth of window (number of bits per pixel).

window.winfo_exists()
Returns 1 if there exists a window named window, an error is returned if no such window exists.

window.winfo_fpixels(number)
Returns a floating-point value giving the number of pixels in window corresponding to the distance given by number. number' may be specified in any of the forms acceptable to Screen Units, such as "2.0c" or "1i". The return value may be fractional; for an integer value, use winfo_pixels()''.

window.winfo_geometry()
Returns the geometry for window, in the form widthxheight+x+y. All dimensions are in pixels.

window.winfo_id() br>> Returns a hexadecimal string giving a low-level platform-specific identifier for window. On Unix platforms, this is the X window identifier. Under Windows, this is the Windows HWND. On the Macintosh the value has no meaning outside Tkinter.

window.winfo_ismapped()
Returns 1 if window is currently mapped, 0 otherwise.

window.winfo_manager()
Returns the name of the geometry manager currently responsible for window, or an empty string if window is not managed by any geometry manager. The name is usually the name of the Tkinter method for the geometry manager, such as pack() or place().

window.winfo_parent()
Returns the path name of window's parent, or an empty string if window is the main window of the application.

window.winfo_pixels(number)
Returns the number of pixels in window corresponding to the distance given by number. Number may be specified in any of the forms acceptable to Screen Units, such as "2.0c" or "1i". The result is rounded to the nearest integer value; for a fractional result, use winfo_fpixels().

window.winfo_pointerx()
If the mouse pointer is on the same screen as window, returns the pointer's x coordinate, measured in pixels in the screen's root window.

window.winfo_pointerxy()
If the mouse pointer is on the same screen as window, returns a list with two elements, which are the pointer's x and y coordinates measured in pixels in the screen's root window.

window.winfo_pointery()
If the mouse pointer is on the same screen as window, returns the pointer's y coordinate, measured in pixels in the screen's root window.

window.winfo_reqheight()
Returns a decimal string giving windows requested height, in pixels. This is the value used by windows geometry manager to compute its geometry.

window.winfo_reqwidth()
Returns a decimal string giving windows requested width, in pixels. This is the value used by windows geometry manager to compute its geometry.

window.winfo_rgb(color)
Returns a list containing three decimal values in the range 0 to 65535, which are the red, green, and blue intensities that correspond to color in the window given by window. Color may be specified in any of the forms acceptable for a color option.

window.winfo_rootx()
Returns a decimal string giving the x-coordinate, in the root window of the screen, of the upper-left corner of window's border (or window if it has no border).

window.winfo_rooty()
Returns a decimal string giving the y-coordinate, in the root window of the screen, of the upper-left corner of window's border (or window if it has no border).

window.winfo_screencells()
Returns a decimal string giving the number of cells in the default color map for window's screen.

window.winfo_screendepth()
Returns a decimal string giving the depth of the root window of window's screen (number of bits per pixel).

window.winfo_screenheight()
Returns a decimal string giving the height of window's screen, in pixels.

window.winfo_screenmheight()
Returns a decimal string giving the height of window's screen, in millimeters.

window.winfo_screenmwidth()
Returns a decimal string giving the width of window's screen, in millimeters.

window.winfo_screenvisual()
Returns one of the following strings to indicate the default visual class for window 's screen: directcolor, grayscale, pseudocolor, staticcolor, staticgray, or truecolor.

window.winfo_visual()
Returns one of the following strings to indicate the visual class for window: directcolor, grayscale, pseudocolor, staticcolor, staticgray, or truecolor.

window.winfo_visualid()
Returns the X identifier for the visual for window.

window.winfo_visualsavailable(includeids=True)
Returns a list whose elements describe the visuals available for window 's screen. Each element consists of a visual class followed by an integer depth. The class has the same form as returned by winfo_visual(). The depth gives the number of bits per pixel in the visual. In addition, if the includeids option is provided, then the depth is followed by the X identifier for the visual.

window.winfo_screenwidth()
Returns a decimal string giving the width of window's screen, in pixels.

window.winfo_x()
Returns a decimal string giving the x-coordinate, in windows parent, of the upper-left corner of windows border (or window if it has no border).

window.winfo_y()
Returns a decimal string giving the y-coordinate, in windows parent, of the upper-left corner of windows border (or window if it has no border).