Actually in the previous semester I have also made some Tkinter application which is the project given by teacher to us. So I go to some tutorials website of Python and find three methods of placing the widgets on the output screen. The three methods are

 1. Pack()
 2. Grid()
 3. Place() #the best method over Pack() and Grid()

Place() method take the coordinates in the form of the x and y. See this link for more clarification https://www.tutorialspoint.com/python/python_gui_programming.htm

https://www.tutorialspoint.com/python/tk_place.htm

See the bottom of the Page of the given link.The Place() method is defined with its proper arguments. I will prefer the Place() method over Pack() and Grid() because it works like CSS as we use in html, because it take the value of (width,height) and place your widget according to wherever you want.

If you find your answer a thumbs up will be appreciated.

Answer from Akshay Kathpal on Stack Overflow
๐ŸŒ
ActiveState
activestate.com โ€บ home โ€บ resources โ€บ quick read โ€บ how to position buttons in tkinter with place
How To Position Buttons In Tkinter With Place (Demo and Codes) - ActiveState
January 24, 2024 - In this example, place() is used to position buttons based on x,y coordinates in a frame: Weโ€™ll draw three buttons. The placement of each button is defined by x and y coordinates and is specified here for button one, two and three.
๐ŸŒ
TutorialsPoint
tutorialspoint.com โ€บ how-do-i-position-the-buttons-on-a-tkinter-window
How do I position the buttons on a Tkinter window?
Set the position of the buttons using the place method by supplying the x and y coordinate values. Finally, run the mainloop of the application window. # Import the Tkinter library from tkinter import * from tkinter import ttk # Create an instance of Tkinter frame win = Tk() # Define the geometry ...
Discussions

python - How do I position buttons in Tkinter? - Stack Overflow
I have a program here that has two buttons in it. I am trying to change their position to be a space between them as currently they are directly below each other. What should I do to change the pos... More on stackoverflow.com
๐ŸŒ stackoverflow.com
tkinter - Setting the position on a button in Python? - Stack Overflow
I just wrote a code that creates a window (using TKinter) and displays one working button. b = Button(master, text="get", width=10, command=callback) But i would like to have multiple buttons More on stackoverflow.com
๐ŸŒ stackoverflow.com
Positioning buttons and entry in python tkinter - Stack Overflow
To begin with, I'm new to this but I've been experimenting with different things. I set my canvas size to 500 by 500 but Its going above that due to the buttons and entry positions (I think). How ... More on stackoverflow.com
๐ŸŒ stackoverflow.com
How do I change the position of a button using Tkinter?
There are 3 options which are .place() .pack() and .grid() i recommend reading up on these 3. Alot of the time i would recommend .grid for more complex GUI's and .pack() for more basic ones. Place i rarely use. More on reddit.com
๐ŸŒ r/learnpython
4
2
January 26, 2020
๐ŸŒ
Python.org
discuss.python.org โ€บ python help
Button Placement Using '.grid' via tkinter - Python Help - Discussions on Python.org
October 23, 2023 - Hello, I am getting familiar with the tkinter package/library. In my test program, I would like to test the three different placement options using either pack, place, or grid. Using either the place or the pack optโ€ฆ
๐ŸŒ
ActiveState
activestate.com โ€บ home โ€บ resources โ€บ quick read โ€บ how to position buttons in tkinter
How to Position Buttons in Tkinter - with Grid, Place or Pack - ActiveState
January 24, 2024 - Click to position buttons using three different geometric methods: pack, grid and place, with Python's GUI application Tkinter.
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ how-to-place-a-button-at-any-position-in-tkinter
How to place a button at any position in Tkinter? - GeeksforGeeks
July 23, 2025 - This method is used to place a button at an absolute defined position. Syntax : button1.place(x=some_value, y=some_value) ... # Importing tkinter module from tkinter import * # Creating a tkinter window root = Tk() # Initialize tkinter window ...
Top answer
1 of 3
51

Causing a widget to appear requires that you position it using with what Tkinter calls "geometry managers". The three managers are grid, pack and place. Each has strengths and weaknesses. These three managers are implemented as methods on all widgets.

grid, as its name implies, is perfect for laying widgets in a grid. You can specify rows and columns, row and column spans, padding, etc.

Example:

b = Button(...)
b.grid(row=2, column=3, columnspan=2)

pack uses a box metaphor, letting you "pack" widgets along one of the sides of a container. pack is extremely good at all-vertical or all-horizontal layouts. Toolbars, for example, where widgets are aligned in a horizontal line, are a good place to use pack.

Example:

b = Button(...)
b.pack(side="top", fill='both', expand=True, padx=4, pady=4)`

place is the least used geometry manager. With place you specify the exact x/y location and exact width/height for a widget. It has some nice features such as being able to use either absolute or relative coordinates (for example: you can place a widget at 10,10, or at 50% of the widgets width or height).

Unlike grid and pack, using place does not cause the parent widget to expand or collapse to fit all of the widgets that have been placed inside.

Example:

b = Button(...)
b.place(relx=.5, rely=.5, anchor="c")

With those three geometry managers you can do just about any type of layout you can imagine.

2 of 3
16

astynax is right. To follow the example you gave:

MyButton1 = Button(master, text="BUTTON1", width=10, command=callback)
MyButton1.grid(row=0, column=0)

MyButton2 = Button(master, text="BUTTON2", width=10, command=callback)
MyButton2.grid(row=1, column=0)

MyButton3 = Button(master, text="BUTTON3", width=10, command=callback)
MyButton3.grid(row=2, column=0)

Should create 3 row of buttons. Using grid is a lot better than using pack. However, if you use grid on one button and pack on another it will not work and you will get an error.

Find elsewhere
๐ŸŒ
Tutorialspoint
tutorialspoint.com โ€บ python โ€บ tk_place.htm
Tkinter place() Method
Try the following example by moving cursor on different buttons โˆ’ ยท from tkinter import * top = Tk() L1 = Label(top, text="Physics") L1.place(x=10,y=10) E1 = Entry(top, bd =5) E1.place(x=60,y=10) L2=Label(top,text="Maths") L2.place(x=10,y=50) E2=Entry(top,bd=5) E2.place(x=60,y=50) L3=Label(top,text="Total") L3.place(x=10,y=150) E3=Entry(top,bd=5) E3.place(x=60,y=150) B = Button(top, text ="Add") B.place(x=100, y=100) top.geometry("250x250+10+10") top.mainloop() When the above code is executed, it produces the following result โˆ’ ยท
๐ŸŒ
YouTube
youtube.com โ€บ watch
How to position buttons in Tkinter with Place - YouTube
How to Position Buttons With PlacePlace() has two options you can use: x and yThe x variable aligns buttons horizontally.The y variable aligns buttons vertic...
Published ย  September 10, 2020
๐ŸŒ
Stack Overflow
stackoverflow.com โ€บ questions โ€บ 62009047 โ€บ positioning-buttons-and-entry-in-python-tkinter
Positioning buttons and entry in python tkinter - Stack Overflow
How would I position both my buttons and my entry on the top of the canvas? from tkinter import * root = Tk() root.resizable(width=False, height=False) w = Canvas(root, width=500, height=500) w.pack() textInput = Entry(root, width=50, borderwidth=2) textInput.pack() textInput.get() def myClick(): myLabel = Label(root, text=textInput.get()) myLabel.pack() def shutDown(): exitProgram = exit() exitProgram.pack() myButton = Button(root, text="Start", command=myClick) myButton.pack(side=LEFT, padx=20, pady=25) myButton2 = Button(root, text="Stop", command=shutDown) myButton2.pack(side=RIGHT, padx=20, pady=25) mainloop()
๐ŸŒ
ActiveState
activestate.com โ€บ home โ€บ resources โ€บ quick read โ€บ how to position buttons in tkinter with pack
How To Position Buttons In Tkinter With Pack (Demo and Codes) - ActiveState
January 24, 2024 - In this example, pack() uses the side option to position buttons in the left, right, top and bottom sections of a frame: This code will draw four buttons, and the placement of each button is specified by left, top, right, and bottom sections of a frame and are specified here. When you run the code it generates a dialog box with all four buttons at the specified locations. import tkinter master=tkinter.Tk() master.title("pack() method") master.geometry("450x350") button1=tkinter.Button(master, text="LEFT") button1.pack(side=tkinter.LEFT) button2=tkinter.Button(master, text="RIGHT") button2.pack(side=tkinter.RIGHT) button3=tkinter.Button(master, text="TOP") button3.pack(side=tkinter.TOP) button4=tkinter.Button(master, text="BOTTOM") button4.pack(side=tkinter.BOTTOM)master.mainloop()
๐ŸŒ
TutorialsPoint
tutorialspoint.com โ€บ setting-the-position-on-a-button-in-tkinter-python
Setting the position on a button in Tkinter Python?
April 22, 2021 - Try the following example by moving cursor on different buttons โˆ’ ยท from tkinter import * top = Tk() L1 = Label(top, text="Physics") L1.place(x=10,y=10) E1 = Entry(top, bd =5) E1.place(x=60,y=10) L2=Label(top,text="Maths") L2.place(x=10,y=50) E2=Entry(top,bd=5) E2.place(x=60,y=50) L3=Label(top,text="Total") L3.place(x=10,y=150) E3=Entry(top,bd=5) E3.place(x=60,y=150) B = Button(top, text ="Add") B.place(x=100, y=100) top.geometry("250x250+10+10") top.mainloop() When the above code is executed, it produces the following result โˆ’ ยท
๐ŸŒ
Python Forum
python-forum.io โ€บ thread-32241.html
tkinter python button position problem
Hello.I 'am beginner with tkinter and I build a simple calculator app and I have a problem with position of 3 buttons (+ , - , =). I have 2 photos to see my problem & understand. 1st photo 2nd photo 2nd photo is the original size of window. So, I ...
๐ŸŒ
Stack Overflow
stackoverflow.com โ€บ questions โ€บ 73973577 โ€บ how-to-change-the-button-position-when-pressed-in-tkinter-python
How to change the button position when pressed in tkinter python - Stack Overflow
If you want the random position to be a wider area increase the number "100" in "random_int". from tkinter import * import random window = Tk() window.geometry('512x512') x = 5 y = 15 def click(): random_int = random.randint(0, 100) x = (random_int) ...
๐ŸŒ
Beautiful Soup
tedboy.github.io โ€บ python_stdlib โ€บ generated โ€บ generated โ€บ Tkinter.Button.location.html
Tkinter.Button.location โ€” Python Standard Library
Tkinter.Button.location ยท View page source ยท Button.location(x, y)ยถ ยท Return a tuple of column and row which identify the cell at which the pixel at position X and Y inside the master widget is located.
๐ŸŒ
Python Basics
pythonbasics.org โ€บ home โ€บ tkinter โ€บ tkinter buttons (gui programming)
Tkinter buttons (GUI Programming) - pythonbasics.org
from tkinter import * class Window(Frame): def __init__(self, master=None): Frame.__init__(self, master) self.master = master # widget can take all window self.pack(fill=BOTH, expand=1) # create button, link it to clickExitButton() exitButton = Button(self, text="Exit", command=self.clickExitButton) # place button at (0,0) exitButton.place(x=0, y=0) def clickExitButton(self): exit() root = Tk() app = Window(root) root.wm_title("Tkinter button") root.geometry("320x200") root.mainloop()
๐ŸŒ
Finxter
blog.finxter.com โ€บ 5-best-ways-to-set-the-position-of-a-button-in-tkinter-python
5 Best Ways to Set the Position of a Button in Tkinter Python โ€“ Be on the Right Side of Change
It places the button in a specific cell of the grid, defined by its row and column indices, and adds padding for aesthetics. The place() method provides the most control over widget positioning by allowing you to specify the exact x and y coordinates of the widgetโ€™s location.
๐ŸŒ
ActiveState
activestate.com โ€บ home โ€บ resources โ€บ quick read โ€บ how to position buttons in tkinter with grid
How To Position Buttons In Tkinter With Grid (Demo and Codes) - ActiveState
January 24, 2024 - In this example, grid() is used to position buttons based on row and column coordinates on a grid in a frame: This code will draw four buttons, and the placement of each button is specified by left, top, right, and bottom sections of a frame and ...
๐ŸŒ
Python Assets
pythonassets.com โ€บ posts โ€บ placing-widgets-in-tk-tkinter
Placing Widgets in Tk (tkinter) | Python Assets
August 5, 2021 - The place() function allows to position widgets by specifying their absolute position (X and Y) relative to a parent widget. If a widget has no parent, then the parent is the window itself.