: '''[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 ''=width'''''x'''''height'''''+'''''x'''''+'''''y'', where any of ''='', ''width'''''x'''''height'', or '''''+'''''x'''''+'''''y'' may be omitted. ''Width'' and ''height'' are positive integers specifying the desired dimensions of ''window''. If ''window'' is gridded (see [http://www.tcl.tk/man/tcl8.6/TkCmd/wm.htm#M53%|%GRIDDED GEOMETRY MANAGEMENT]) then the dimensions are specified in grid units; otherwise they are specified in pixel units. The ''x'' and ''y'' values 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. ---- **Windows manager and set geometry** [LV] 2008 Mar 26 Note that, at least with the X Window system, an application can only suggest/request a change in window size or location - the window manager implements policy, and can decide where to actually put the window, how big it can be, etc. ---- **When to set the geometry when main window is shown** [HaO] 2015-12-04: On the clt thread [https://groups.google.com/forum/#!topic/comp.lang.tcl/2CpuNSt_ZQI%|%"tkwait visibility" on windows stalls%|%] started 2015-12-02, there was a discussion how to restore geometry on program startup. In case of complex widgets, the geometry may only be set after the window is fully drawn once. Thus, tombert came up with the following proposition: ======tcl wm withdraw . wm attributes . -alpha 0 # draw all things wm deiconify . update idletasks # do other things, if not "update idletasks" it not necessary after idle {show_windows_proc} } proc show_windows_proc {} { # load geometry from preferences to $geometry wm geometry . $geometry # now slowly increase alpha using a timer } ====== ---- **See also** * [wm] * [winfo geometry] * [Total Window Geometry] * [documenting 'wm geometry'] * [check geometry on Aqua] <> Tk syntax help | Command | Tk