Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #17573
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!tudelft.nl!txtfeed1.tudelft.nl!multikabel.net!newsfeed10.multikabel.net!xlned.com!feeder5.xlned.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <urbangabo@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.012 |
| X-Spam-Evidence | '*H*': 0.98; '*S*': 0.00; 'newbie': 0.03; 'everyone!': 0.05; 'thx': 0.07; 'tkinter': 0.09; 'todo:': 0.09; 'def': 0.13; 'received:209.85.214.174': 0.13; 'linux': 0.17; 'apache': 0.21; 'windows': 0.26; 'import': 0.27; 'message- id:@mail.gmail.com': 0.28; 'print': 0.29; 'class': 0.29; 'app': 0.31; 'quite': 0.32; 'hi,': 0.32; 'received:209.85.214': 0.32; 'to:addr:python-list': 0.34; 'suggestions': 0.35; 'to:name:python- list': 0.37; 'received:google.com': 0.37; 'skip:_ 10': 0.37; 'could': 0.37; 'references': 0.38; 'received:209.85': 0.38; 'received:209': 0.40; 'to:addr:python.org': 0.40; 'here': 0.65; 'ideas,': 0.73; 'inside.': 0.84 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=4zayFvfJ+JLLMoXkTzQGnOknQ7g6mXqOV4ce9h9+Ef8=; b=OSUJNCAFYMrQtcsh1RpVtz4F6HWQ5pPDYPKLiA8ZbBKrS93y7fI4v1QPCXaZof44OZ qExEMCMOj07LGCc58jEKfh9sCxNTXhR5fCJ9Yixcx4cB2XoEijLp6L4khpGRazwIkdEZ 52/lygEtzsu0Bncq5WcB48foC72nBbmCGVzw8= |
| MIME-Version | 1.0 |
| Date | Tue, 20 Dec 2011 12:09:41 +0100 |
| Subject | Set initial size in TKinter |
| From | Gabor Urban <urbangabo@gmail.com> |
| To | python-list <python-list@python.org> |
| Content-Type | text/plain; charset=ISO-8859-1 |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.12 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://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 | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.3861.1324379384.27778.python-list@python.org> (permalink) |
| Lines | 54 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1324379384 news.xs4all.nl 6909 [2001:888:2000:d::a6]:42646 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.python:17573 |
Show key headers only | View raw
Hi,
I am quite newbie with Tkinter and I could not find the way to set the
size of the application. (I could find the method to make it
resizeable, though :-)) ) Any ideas, suggestions or links to
references are wellcome.
Here is my code:
from Tkinter import *
class Application(Frame):
def say_hi(self):
self.db += 1
print 'hi there, -->> UG everyone! db = %d'%self.db
## TODO: meretezhetoseg
def createWidgets(self):
top = self.winfo_toplevel()
top.rowconfigure(0,weight = 1)
top.columnconfigure(0,weight = 1)
self.rowconfigure(0,weight = 1)
self.columnconfigure(0,weight = 1)
self.QUIT = Button(self)
self.QUIT["text"] = "QUIT"
self.QUIT["fg"] = "red"
self.QUIT["command"] = self.quit
self.QUIT.pack({"side": "left"})
self.hi_there = Button(self)
self.hi_there["text"] = "Hello",
self.hi_there["command"] = self.say_hi
self.hi_there.pack({"side": "left"})
def __init__(self, master=None):
Frame.__init__(self, master)
self.pack()
self.createWidgets()
self.db = 0
app = Application()
app.master.title('UG test')
app.mainloop()
Thx in advance...
Gabor
--
Linux is like a wigwam: no Gates, no Windows and an Apache inside.
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
Set initial size in TKinter Gabor Urban <urbangabo@gmail.com> - 2011-12-20 12:09 +0100
Re: Set initial size in TKinter Rick Johnson <rantingrickjohnson@gmail.com> - 2011-12-20 06:37 -0800
Re: Set initial size in TKinter Eric Brunel <eric.brunel@pragmadev.nospam.com> - 2011-12-20 16:20 +0100
Re: Set initial size in TKinter Rick Johnson <rantingrickjohnson@gmail.com> - 2011-12-20 07:30 -0800
csiph-web