How to get an element to stick to the bottom-right corner in Tkinter?

Tkinter has many inbuilt features, functions, and methods that we can use to construct the GUI of an application. It is necessary to know how we can set the position of a particular widget in the application so that it becomes responsive in nature.

Tkinter also provides geometry managers through which we can set the position of elements and widgets. The Place geometry manager is used for configuring the position of complex widgets with precise control over their placement.

Using place() with anchor Property

To position a widget at the bottom-right corner, we can use the place() geometry manager with the anchor property. The key parameters are:

  • relx=1.0 − positions at the rightmost edge (100% of window width)
  • rely=1.0 − positions at the bottom edge (100% of window height)
  • anchor=SE − anchors the widget at its South-East (bottom-right) corner

Example

Let us create a button and position it at the bottom-right corner of the application window −

# Import the required libraries
from tkinter import *
from tkinter import ttk

# Create an instance of tkinter frame or window
win = Tk()

# Set the size of the window
win.geometry("700x350")
win.title("Bottom-Right Positioning Example")

# Add button in the frame
button1 = ttk.Button(win, text="Bottom-Right Button")
button1.place(rely=1.0, relx=1.0, x=0, y=0, anchor=SE)

win.mainloop()

Multiple Elements at Bottom-Right

You can also position multiple elements near the bottom-right corner by adjusting their relative positions −

from tkinter import *
from tkinter import ttk

win = Tk()
win.geometry("700x350")
win.title("Multiple Bottom-Right Elements")

# First button at bottom-right corner
button1 = ttk.Button(win, text="Button 1")
button1.place(rely=1.0, relx=1.0, x=-10, y=-10, anchor=SE)

# Second button slightly above the first one
button2 = ttk.Button(win, text="Button 2") 
button2.place(rely=1.0, relx=1.0, x=-10, y=-50, anchor=SE)

# Label at bottom-right
label = Label(win, text="Bottom-Right Label", bg="lightblue")
label.place(rely=1.0, relx=1.0, x=-120, y=-10, anchor=SE)

win.mainloop()

Key Parameters Explained

Parameter Description Value for Bottom-Right
relx Relative X position (0.0 to 1.0) 1.0 (rightmost)
rely Relative Y position (0.0 to 1.0) 1.0 (bottom)
anchor Which part of widget to position SE (South-East corner)
x, y Offset in pixels Negative values for padding

Conclusion

Use the place() geometry manager with relx=1.0, rely=1.0, and anchor=SE to position widgets at the bottom-right corner. Add negative x and y offsets to create padding from the window edges.

Updated on: 2026-03-26T00:12:30+05:30

2K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements