Maximize main window with code
Fredrik Lundh
fredrik at pythonware.com
Sat Jul 1 04:16:23 EDT 2006
JohnJohnUSA wrote:
> I am new to Python. How do I get the following program to appear
> initially with the window maximized? Thanks for your help!
>
> from Tkinter import *
> # set up the window itself
> top = Tk()
top.state("zoomed")
> F = Frame(top)
> F.pack()
> # add the widgets
> lHello = Label(F, text="Hello")
> lHello.pack()
> bQuit = Button(F, text="Quit", command=F.quit)
> bQuit.pack()
> # set the loop running
> top.mainloop()
</F>
More information about the Python-list
mailing list