Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #102666
| From | Peter Otten <__peter__@web.de> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: [newbie] problem with geometry setting in Tkinter |
| Date | 2016-02-08 13:26 +0100 |
| Organization | None |
| Message-ID | <mailman.93.1454934401.2317.python-list@python.org> (permalink) |
| References | <31e9b382-bc20-4283-b17c-23a97c8b6083@googlegroups.com> |
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
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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