Set initial size in TKinter

Rick Johnson rantingrickjohnson at gmail.com
Tue Dec 20 09:37:58 EST 2011


On Dec 20, 5:09 am, Gabor Urban <urbang... at gmail.com> wrote:
> Hi,
>
> I am quite newbie with Tkinter and I could not find the way to set the
> size of the application.

Probably due to this haphazard coding style; why would you name an
object "Application" that is an instance of Tkinter.Frame? That is
just going to confuse people, including yourself. Choosing proper
names is very important. Would you call a cat a hat? Or a dog a frog?
Also, why did you post so much non-applicable code? Here is what you
should have posted...

from Tkinter import *
#
app = Tk()
app.title('This is an App, not a frame or a button')
app.config(width=50, height=400)
#frame1 = Frame() # Proper Naming Example.
#frame2 = Frame() # Proper Naming Example.
app.mainloop()

YWATF



More information about the Python-list mailing list