is there an easy way of positioning windows on the centre of the screen? it has to be size-independent since I don't know the windows' size in advance.
-Jasper
#script to center main window
update
set sw [lindex [wm maxsize .] 0]
set sh [lindex [wm maxsize .] 1]
set ww [winfo width .]
set wh [winfo height .]
set newx [expr ($sw-$ww)/2]
set newy [expr ($sh-$wh)/2]
wm geometry . "+$newx+$newy" Bob Rashkin
rrashkin@csc.com
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.