Thanks a lot for you response.
S
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> "Pat" <[EMAIL PROTECTED]> wrote:
>
>> I am trying to place a dialog in the center of the screen based on a
>> users
>> screen resolution. I can get the width and height of the screen, b
Lonnie Princehouse wrote:
> Tkinter takes strings as its arguments; it's TCL's legacy.
geometry strings are an X windows thing...
> 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))
note that "+%ld" (why bot
"Pat" <[EMAIL PROTECTED]> wrote:
> I am trying to place a dialog in the center of the screen based on a users
> screen resolution. I can get the width and height of the screen, but I can't
> seem to use the following:
>
> root.geometry('WxH+X+Y')
>
> It appears the values for X and Y need to be i
Thanks.
S
"Lonnie Princehouse" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> 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))
>
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))
--
http://mail.python.org/mailman/listinfo/python-list
I am trying to place a dialog in the center of the screen based on a users
screen resolution.
I can get the width and height of the screen, but I can't seem to use the
following:
root.geometry('WxH+X+Y')
It appears the values for X and Y need to be integers and not a variable
like width/2-40
S