Faidon Kampouropoulos
Faidon Kampouropoulos

Reputation: 15

Make a button that adapts its size to the text it contains in tkinter

I need the buttons in the following code to resize in order to fit in the text properly. How is it possible? Currently is the text all_definitions_list[0] is wider than the button then the texts gets cropped up.

choice1=Button(newWindow, text=all_definitions_list[0], height=5, width=50, 
command=lambda:wut(choice1, choice2, choice3, choice4, wordLabel))
choice1.place(relx=0.5, rely=y_list[0], anchor=N)

Upvotes: 0

Views: 34

Answers (1)

Faidon Kampouropoulos
Faidon Kampouropoulos

Reputation: 15

Don't use the argument width=50

Upvotes: 1

Related Questions