Thursday, January 22, 2026
HomeLanguagesHow to make Rounded buttons in Tkinter

How to make Rounded buttons in Tkinter

Tkinter is 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 define borderwidth value 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 module
from tkinter import *
  
# Create object
root = Tk()
  
# Adjust size
root.geometry("400x400")
  
# Execute tkinter
root.mainloop()


Output:

Step 2: Add button and image.

Python3




# Add Image
login_btn = PhotoImage(file = "Image Path")
  
# Create button and image
img = Button(root, image = login_btn,
             borderwidth = 0)
  
img.pack()


Output:

Below is the full implementation:

Python3




# Import Module
from tkinter import *
  
# Create Object
root = Tk()
  
# Set geometry
root.geometry("400x400")
  
# Add Image
login_btn = PhotoImage(file = "Image Path")
  
# Create button and image
img = Button(root, image = login_btn,
             borderwidth = 0)
  
img.pack()
  
# Execute Tkinter
root.mainloop()


Output:

RELATED ARTICLES

1 COMMENT

Most Popular

Dominic
32475 POSTS0 COMMENTS
Milvus
119 POSTS0 COMMENTS
Nango Kala
6847 POSTS0 COMMENTS
Nicole Veronica
11977 POSTS0 COMMENTS
Nokonwaba Nkukhwana
12064 POSTS0 COMMENTS
Shaida Kate Naidoo
6986 POSTS0 COMMENTS
Ted Musemwa
7220 POSTS0 COMMENTS
Thapelo Manthata
6933 POSTS0 COMMENTS
Umr Jansen
6912 POSTS0 COMMENTS