Sanchez
Sanchez

Reputation: 55

Is it possible to make a squircle button with Tkinter?

Is there any way to create a squircle button with tkinter?

A squircle is a square with rounded corners. I was just curious if I can make a squircle button with tkinter..

Upvotes: 0

Views: 184

Answers (1)

Dodu
Dodu

Reputation: 139

There is no way to do this in tkinter but there is this one method but it involves an image to do this here is the code.

import tkinter as tk
from tkinter import *

root = tk.Tk()
root.geometry('300x400')
root.title('hi')

img = PhotoImage(file = 'folder/img.png')
b1 = Button(root, image = img, command = somecommand)
b1.pack()

This should work you just have to make an image for the button

Upvotes: 1

Related Questions