Screen placement based on screen resolution

Pat patrohlf at adelphia.net
Fri Apr 7 15:28:04 EDT 2006


Thanks.
S
"Lonnie Princehouse" <finite.automaton at gmail.com> wrote in message 
news:1144437293.086701.49990 at v46g2000cwv.googlegroups.com...
> Tkinter takes strings as its arguments; it's TCL's legacy.  You can use
> string formatting for this:
>
> x = width/2-40
> y = height/2-30
>
> root.geometry('%ldx%ld+%ld+%ld' % (width, height, x, y))
> 





More information about the Python-list mailing list