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.


Let us suppose that we want our widget position to the bottom-right of the application window, then we can use place geometry manager with anchor property.

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

# Create an instance of tkinter frame or window

# Set the size of the window

# Add buttons in the frame
button1=ttk.Button(win, text="Button-1"), relx=1.0, x=0, y=0, anchor=SE)



Running the above code will place the widget at the bottom-right of the window.

Updated on 05-Aug-2021 14:28:14