0

I'm making a simple GUI with TKinter. I use this code to create a button with some text labelling it:

myButton_multiply = Button(root, text="*", padx=44, pady=20, bg="#7FFFD4", fg="green", command=button_multiply)
myButton_multiply.grid(row=5, column=0)

The text was smaller than I wanted, so I tried changing the size of the text by using font(). However, when I do this, the button's size changes as well. How can I resize the text label while leaving the button the same size?

3
  • Welcome to Stack Overflow. Please see the edit in order to understand how to present questions properly here: we want questions to be clear and direct, and focused only on the question itself. It's good to try to find a solution to the problem first (and it's okay if you use ChatGPT to do that); but please show the result of your attempts directly, rather than talking about how you tried to figure it out. More importantly, please leave out all the greetings and formalities: this is not a discussion forum, and posts here are about the code, not you or anyone who answers. Commented Jul 28, 2023 at 2:29
  • Are you a normal user or how did you edit my text? Commented Jul 28, 2023 at 2:54
  • Every user on Stack Overflow can suggest edits for approval; everyone can edit their own posts; and users with 2000 or more reputation can participate in the approval process and also make edits directly. Please see stackoverflow.com/help/privileges and stackoverflow.com/help/reputation for details. Commented Jul 28, 2023 at 3:04

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.