Changing ttk Button Height in Python

后端 未结 4 747
-上瘾入骨i
-上瘾入骨i 2020-12-15 23:15

This seems like a silly question, but is it possible to change the height of a ttk button manually?

Something like button = tkinter.Button(frame, text=\'hi\',

4条回答
  •  执念已碎
    2020-12-15 23:30

    This worked for me:

    my_button = ttk.Button(self, text="Hello World !")
    my_button.grid(row=1, column=1, ipady=10, ipadx=10)
    

    where ipady and ipadx adds pixels inside the button unlike pady and padx which adds pixels outside of the button

提交回复
热议问题