Version 1 of wm geometry

Updated 2004-08-18 14:15:26

wm geometry window ?newGeometry?

If newGeometry is specified, then the geometry of window is changed and an empty string is returned. Otherwise the current geometry for window is returned (this is the most recent geometry specified either by manual resizing or in a wm geometry command). NewGeometry has the form =widthxheight��±x��±y, where any of =, widthxheight, or ��±x��±y may be omitted. Width and height are positive integers specifying the desired dimensions of window. If window is gridded (see GRIDDED GEOMETRY MANAGEMENT below) then the dimensions are specified in grid units; otherwise they are specified in pixel units. X and y specify the desired location of window on the screen, in pixels. If x is preceded by +, it specifies the number of pixels between the left edge of the screen and the left edge of window 's border; if preceded by - then x specifies the number of pixels between the right edge of the screen and the right edge of window 's border. If y is preceded by + then it specifies the number of pixels between the top of the screen and the top of window 's border; if y is preceded by - then it specifies the number of pixels between the bottom of window 's border and the bottom of the screen. If newGeometry is specified as an empty string then any existing user-specified geometry for window is cancelled, and the window will revert to the size requested internally by its widgets.


See also:


Tk syntax help - Category Command