0

I'm trying to set a fixed height to a ttk.Button on MacOS but every fix I tried has failed until now.

from tkinter import *
from tkinter import ttk

root = Tk()
root.resizable(False, False)
frame = ttk.Frame(root)
frame.grid()

style = ttk.Style()
style.configure('W.TButton', font=('Helvetica',20), padding=10)


ttk.Button(frame, text='Find businesses', style='W.TButton', width=20).grid(row=0, column=0)
ttk.Button(frame, text="Hello World!", style='W.TButton').grid(row=1, column=0)
ttk.Button(frame, text="Quit", style='W.TButton', command=root.destroy).grid(row=2, column=0)

root.mainloop()

I tried using ipady in the grid() but it was same as normal padding, it didn't add padding inside the button but outside instead.

Without ipady : without ipady

If i add ipady=10 inside the grid() only in the first Button :with ipady

As you see the only difference is outside and not inside.

Mallux
  • 17
  • 1
  • 3

0 Answers0