Configuring a button (or any widget) in Tkinter is done by calling a configure method "config"

To change the size of a button called button1 you simple call

button1.config( height = WHATEVER, width = WHATEVER2 )

If you know what size you want at initialization these options can be added to the constructor.

button1 = Button(self, text = "Send", command = self.response1, height = 100, width = 100) 
Answer from cdbitesky on Stack Overflow
🌐
Reddit
reddit.com › r/learnpython › how do i make the buttons be square in tkinter?
r/learnpython on Reddit: How do I make the buttons be square in Tkinter?
March 18, 2022 -

I tried to do it with padx and pady by setting them to the same value, not square.

I tried to do it with width and height parameters also setting them to the same value, it's still not square.

I am stuck, does anyone know why these methods are not working and which ones do?

🌐
GeeksforGeeks
geeksforgeeks.org › python › dynamically-resize-buttons-when-resizing-a-window-using-tkinter
Dynamically Resize Buttons When Resizing a Window using Tkinter - GeeksforGeeks
July 23, 2025 - So the solution here is, make a dynamic button, which means the button size will change as per window size. Let's understand with step-by-step implementation: ... # Import module from tkinter import * # Create object root = Tk() # Adjust size ...
🌐
Delft Stack
delftstack.com › home › howto › python tkinter › how to change the tkinter button size
How to Change the Tkinter Button Size | Delft Stack
February 5, 2025 - If compound is not configured, the text will not show in the button. import tkinter as tk import tkinter.font as tkFont app = tk.Tk() app.geometry("300x100") fontStyle = tkFont.Font(family="Lucida Grande", size=20) labelExample = tk.Label(app, text="20", font=fontStyle) pixelVirtual = tk.PhotoImage(width=1, height=1) buttonExample1 = tk.Button( app, text="Increase", image=pixelVirtual, width=100, height=100, compound="c" ) buttonExample2 = tk.Button( app, text="Decrease", image=pixelVirtual, width=100, height=100, compound="c" ) buttonExample1.pack(side=tk.LEFT) buttonExample2.pack(side=tk.RIGHT) app.mainloop()
🌐
Dafarry
dafarry.github.io › tkinterbook › button.htm
The Tkinter Button Widget
If the variable is changed, the button text is updated. (textVariable/Variable) ... Which character to underline, in a text label. Default is -1, which means that no character is underlined. (underline/Underline) ... The width of the button. If the button displays text, the size is given in ...
🌐
TutorialsPoint
tutorialspoint.com › article › how-do-i-change-button-size-in-python-tkinter
How do I change button size in Python Tkinter?
October 4, 2024 - The height defines the number of ... win.title("Button Size Example") # Create buttons with different sizes Button(win, text="Small", height=2, width=8).pack(pady=5) Button(win, text="Medium", height=3, width=12).pack(pady=5) ...
🌐
TutorialKart
tutorialkart.com › python › tkinter › button › width
Tkinter Button width - Set width of Button
February 3, 2025 - To set a specific width to Button in Tkinter, pass width parameter with required number of characters length or pixels while creating the Button. In this tutorial, we will go through examples using the width option to modify the size of a Tkinter ...
Find elsewhere
Top answer
1 of 3
6

Regarding your initial question: the button does appear physically. The problem is, since it is so large, it is hard to distinguish from the rest of the window.

Now, you said that your ultimate goal is to change the size of a button. If so, then you are on the right track: you use the height and width options for this.

However, I would recommend that you make a few changes to your code:

  1. Don't make the button so huge. Even on a very big monitor, having a button be that size is way overkill.
  2. Don't make the window so huge. Nobody wants an application that takes up the entire screen.
  3. Use .grid instead of .place. Doing so will make it easier for you to place widgets where you want them.
  4. Set the height and width options when you make the button, not after it.
  5. There is no need to import sys here. Only import what you need.
  6. Don't import like this: from tkinter import *. Doing so dumps a whole bunch of names in the global namespace that can easily be overwritten.

Here is my version of your script:

import tkinter as tk

def mmWindow():
    mmWindow = tk.Tk()
    mmWindow.geometry('600x600')

mWindow = tk.Tk()
# You can set any size you want
mWindow.geometry('500x500+0+0')
mWindow.title('DMX512 Controller')

wtitle = tk.Label(mWindow, text="Pi DMX", fg='blue')
wtitle.grid(row=0, column=1)

# You can set any height and width you want
mmbutton = tk.Button(mWindow, height=5, width=20, text="Main Menu", command=mmWindow)
mmbutton.grid(row=1, column=1)

mWindow.mainloop()
2 of 3
1
import sys
from tkinter import *

def update_window_size():
    mmWindow.geometry('600x600')

mmWindow  = Tk()
mmWindow .geometry('1920x1080+0+0')
mmWindow .title('DMX512 Controller')

wtitle = Label(mmWindow, text="Pi DMX", fg='blue')
wtitle.place(relx=0.33, rely=0.0925925)

mmbutton = Button(mmWindow, text="Main Menu", command=update_window_size)
mmbutton.place(relw=0.104167, relh=0.185185, relx=0.104167, rely=0.185185)

mmWindow.mainloop()

I know this is late, but just want to add my method of how to solve the issue of how to make the button size change. I believe using place with relw and relh will be a better way to go. relw and relh & relx and rely will be fraction of the height and width of the parent widget. Therefore you do not need to worry about adjusting the size of both the wtitle and mmbutton.

If you want to change it's width and height from place then just put the code below on button command.

def update_button_size():
    mmbutton.place(width=20, height=20)

mmbutton = Button(mmWindow, text="Main Menu", command=update_button_size)
mmbutton.place(width=400, height=400, relx=0.104167, rely=0.185185)

If you want to change it's width and height from config then use code below.

def update_button_size():
    mmbutton.config(width=20, height=20)

mmbutton = Button(mmWindow, text="Main Menu", command=update_button_size)
mmbutton.place(relx=0.104167, rely=0.185185)
mmbutton.config(width=400, height=400)

From my understanding config width and height is different from place width and height.

🌐
Tkinter
tkinter.com › how-to-resize-buttons-in-ttkbootstrap-tkinter-ttkbootstrap-4
How To Resize Buttons in TTKBootstrap – Tkinter TTKBootstrap 4 – TKinter.com
January 3, 2023 - To resize a button and it’s font with ttkbootstrap, you need to use a Style() widget. And you need to name that style a very specific way to get the outcome that you want. ... from tkinter import * import ttkbootstrap as tb root = tb.Window(themename="superhero") #root = Tk() root.title("TTK ...
🌐
Tcl Wiki
wiki.tcl-lang.org › page › tkinter.Button
tkinter.Button
For a text button (no image or with compound="none") then the width specifies how much space in characters to allocate for the text label. If the width is negative then this specifies a minimum width. If this option is not specified, the button's desired width is computed from the size of the image or bitmap or text being displayed in it.
🌐
TutorialKart
tutorialkart.com › python › tkinter › how-to-set-the-size-of-button-in-tkinter
How to Set the Size of Button in Tkinter
February 4, 2025 - In this example, we create two buttons with different sizes. The first button has a width of 15 characters and a height of 2 text lines, while the second button has a width of 20 characters and a height of 3 text lines.
🌐
GitHub
github.com › lawsie › guizero › issues › 59
Can the size of a button be controlled in pixels · Issue #59 · lawsie/guizero
December 2, 2017 - Please close my old issue. Hello everyone, is there a way to control the size of a button in pixels not characters? Thanks for any help, LouisP
Author   LouisPi
🌐
TutorialsPoint
tutorialspoint.com › how-to-change-the-font-and-size-of-buttons-and-frame-in-tkinter
How to change the font and size of buttons and frame in tkinter?
April 15, 2021 - #Import tkinter library from tkinter ... font= ('Helvetica 20 bold italic'), command=click_to_close) button.pack(pady=20) win.mainloop() Running the given code will generate a button with some text in it which can be resized by changing the value of the font-size....
🌐
Python Guides
pythonguides.com › python-tkinter-button
How To Create Buttons In Python With Tkinter?
March 19, 2025 - The resulting button will have ... with size 14, a width of 10 characters, a height of 2 lines, 10 pixels of horizontal padding, 5 pixels of vertical padding, and a raised border style. ... The primary purpose of buttons is to trigger specific actions or events when clicked. Tkinter allows you ...
🌐
GitHub
github.com › TomSchimansky › CustomTkinter › wiki › CTkButton
CTkButton · TomSchimansky/CustomTkinter Wiki
button = customtkinter.CTkButton(master=root_tk, width=120, height=32, border_width=0, corner_radius=8, text="CTkButton", command=button_event) button.place(relx=0.5, rely=0.5, anchor=tkinter.CENTER)
Author   TomSchimansky
🌐
Python Forum
python-forum.io › thread-43641.html
[Tkinter] Pixel sized button does not work associated method
Actually, I'm learning Python to be able to teach to a friend of mine, I'm a (.Net C#) programmer, she's not. So I created 10 buttons for the digits, and their respective methods whi...
🌐
Sololearn
sololearn.com › en › Discuss › 3229529 › python-adjusting-text-size-in-a-button
Python: Adjusting Text Size in a Button | Sololearn: Learn to code for FREE!
You could try setting the width and height properties of the button, if you want it to have a specific size. https://pythonexamples.org/JUMP_LINK__&&__python__&&__JUMP_LINK-button-tkinter-example/ https://pythonexamples.org/python-tkinter-button-change-font/ 28th Jul 2023, 3:39 AM ·
🌐
TutorialKart
tutorialkart.com › python › tkinter › button › height
Tkinter Button height - Set Height of Button
February 3, 2025 - To set a specific height for a Button in Tkinter, pass the height parameter with the required number of text lines or pixels while creating the Button. In this tutorial, we will go through examples using the height option to modify the size of a Tkinter Button.