Tkinteris a Python module that is used to create GUI (Graphical User Interface) applications with the help of a variety of widgets and functions. Like any other GUI module, it also supports images i.e you can use images in the application to make it more attractive.
In this article, we will discuss How to make a Rounded Button in Tkinter, There is no in-built method to make rounded buttons in Tkinter. For making the button rounded we will defineborderwidthvalue to zero
borderwidth:It will represent the size of the border around the label. By default, borderwidth is 2 pixels. “bd” can also be used as a shorthand for borderwidth.
Step-by-step implementation:
Step 1:Create a Normal Tkinter Window.
Python3# Import modulefromtkinterimport*# Create objectroot=Tk()# Adjust sizeroot.geometry("400x400")# Execute tkinterroot.mainloop()
Output:

Step 2:Add button and image.
Python3# Add Imagelogin_btn=PhotoImage(file="Image Path")# Create button and imageimg=Button(root,image=login_btn,borderwidth=0)img.pack()
Output:

Below is the full implementation:
Python3# Import Modulefromtkinterimport*# Create Objectroot=Tk()# Set geometryroot.geometry("400x400")# Add Imagelogin_btn=PhotoImage(file="Image Path")# Create button and imageimg=Button(root,image=login_btn,borderwidth=0)img.pack()# Execute Tkinterroot.mainloop()
Output:
