pythontkinter

How to add height and width to Tkinter form


I am trying to add height of 600 and width of 600 to following form but I couldn't find any potion to do this. How can I do this?

import Tkinter
import tkMessageBox
from Tkinter import *

app = Tkinter.Tk()
app.configure(background='black')
app.resizable(width=False, height=False)
app.title('Geometric Network')
app.iconbitmap(default='app.ico')
def helloCallBack():
   tkMessageBox.showinfo( "Hello Python", "Hello World")

B = Tkinter.Button(app, text ="Hello", command = helloCallBack)

B.pack()
app.mainloop()

Solution

  • Using geometry, you can change the size or position of top level windows:

    app = Tkinter.Tk()
    app.geometry('600x600')  # <---
    ...