Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #102671

Re: [newbie] problem with geometry setting in Tkinter

Newsgroups comp.lang.python
Date 2016-02-08 06:34 -0800
References <31e9b382-bc20-4283-b17c-23a97c8b6083@googlegroups.com> <mailman.93.1454934401.2317.python-list@python.org>
Message-ID <2c0abe95-fbea-4818-bf8d-0bb1261cf8b8@googlegroups.com> (permalink)
Subject Re: [newbie] problem with geometry setting in Tkinter
From jenswaelkens@gmail.com

Show all headers | View raw


Op maandag 8 februari 2016 13:26:56 UTC+1 schreef Peter Otten:
> jenswaelkens@gmail.com wrote:
> 
> > I'm trying to set the geometry of my top window, but the size is
> > unaffected.
> > This is the code:
> > 
> > #!/usr/bin/env python
> > import Tkinter
> > top=Tkinter.Tk()
> > top.geometry=('900x460')
> 
> That's an assignment, but geometry() is a method that you have to invoke:
> 
> top.geometry('900x460')
> 
> > top.update_idletasks()
> > print (top.winfo_width())
> > print (top.winfo_height())
> > print (top.winfo_geometry())
> > top.mainloop()
> > 
> > and this is the result when running the code:
> > 200
> > 200
> > 200x200+1+584
> > 
> > 
> > Can anyone here tell me what I am doing wrong and how to change it?
> > Thanks
> > 
> > Jens

thanks a lot for helping me out

kind regards,
Jens

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[newbie] problem with geometry setting in Tkinter jenswaelkens@gmail.com - 2016-02-08 04:15 -0800
  Re: [newbie] problem with geometry setting in Tkinter Peter Otten <__peter__@web.de> - 2016-02-08 13:26 +0100
    Re: [newbie] problem with geometry setting in Tkinter jenswaelkens@gmail.com - 2016-02-08 06:34 -0800
      Re: [newbie] problem with geometry setting in Tkinter Christian Gollwitzer <auriocus@gmx.de> - 2016-02-08 16:11 +0100

csiph-web