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


Groups > comp.lang.python > #102666

Re: [newbie] problem with geometry setting in Tkinter

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Peter Otten <__peter__@web.de>
Newsgroups comp.lang.python
Subject Re: [newbie] problem with geometry setting in Tkinter
Date Mon, 08 Feb 2016 13:26:31 +0100
Organization None
Lines 33
Message-ID <mailman.93.1454934401.2317.python-list@python.org> (permalink)
References <31e9b382-bc20-4283-b17c-23a97c8b6083@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding 7Bit
X-Trace news.uni-berlin.de Kos2Vx9ua3PCvNTcD+YlaguDclhhrsIgNEgzgnXFeDYg==
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'subject:: [': 0.03; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:setting': 0.09; 'python': 0.10; 'received:80.91.229.3': 0.16; 'received:dip0.t-ipconnect.de': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'received:t-ipconnect.de': 0.16; 'subject:Tkinter': 0.16; 'wrote:': 0.16; 'subject:] ': 0.19; 'subject:problem': 0.22; 'tkinter': 0.22; 'trying': 0.22; 'import': 0.24; 'header:User- Agent:1': 0.26; 'header:X-Complaints-To:1': 0.26; 'skip:# 10': 0.27; 'skip:( 20': 0.28; 'code:': 0.29; "i'm": 0.30; 'print': 0.30; 'anyone': 0.32; 'running': 0.34; 'but': 0.36; 'to:addr :python-list': 0.36; 'method': 0.37; 'thanks': 0.37; 'received:org': 0.37; 'doing': 0.38; 'wrong': 0.38; 'to:addr:python.org': 0.40; 'subject:with': 0.40; 'received:de': 0.40; 'email addr:gmail.com': 0.62; 'here': 0.66; 'window,': 0.84
X-Injected-Via-Gmane http://gmane.org/
X-Gmane-NNTP-Posting-Host p57bd88ab.dip0.t-ipconnect.de
User-Agent KNode/4.13.3
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.21rc2
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Xref csiph.com comp.lang.python:102666

Show key headers only | View raw


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 | 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