Layout Management – tkinter

Previous
Next

Layout management:

  • We must use the Layout Management to arrange the components.
  • Using the pre-defined functionality of Component, we can Layout that Component.

pack() : Arrange the components one by one sequentially on the window.
grid() : Arrange the components like table format(rows and columns)
place() : Arrange the component at specify (x,y) co-ordinates.

Layout the Button with pack() method:

from tkinter import Tk, Button
frame = Tk()
frame.title("GUI")
frame.geometry("500x300")

b = Button(frame, text="Click Me")
b.pack()
Previous
Next

Add Comment

Courses Enquiry Form