Use this tag when you are referring to the tkinter button, created with the function tkinter.Button(). DON'T USE THIS TAG TO REFER TO ANY OTHER BUTTON.
Questions tagged [tkinter-button]
346 questions
1
vote
0 answers
tkinter button function calls: multiple presses calling same function multiple times
I'm trying to make a Raspberry Pi Media Player, using omxplayer and tkinter.
I grab upto 16 video from a USB drive(or in local folder) and display them as thumbnails on a grid of buttons. When a button is pressed, it plays that video with omxplayer…

quokka does stuff
- 13
- 4
1
vote
2 answers
Tkinter: Remove active button highlight
How can I remove the dotted black border after a button is clicked in Tkinter (with Ttkthemes)?
I'm on Windows 10, Python 3.7.9.
There seems to be no uniform way to remove it and I searched across Google and SO with no luck. Thanks.
Here's a…
user11709129
1
vote
1 answer
how to make a tkinter button click itself?
I'm trying to make a clicker game for my friend. I just want to know how to make a button that when clicked, clicks another button. Here is some of the code:
from tkinter import *
import time
root = Tk()
root.geometry('600x600')
score =…

maze
- 51
- 8
0
votes
0 answers
Tkinter setting image to button gets invisible and imposible to interactwith
I have a tkinter program (Python) That contains a button with a PNG image on it (image 1). (Just upgrading button styles) When you click the button it will run a function (with some code) and it also changes the button image (image 2) (to have other…

nikita goncharov
- 708
- 1
- 2
- 13
0
votes
1 answer
Tkinter - GUI: checkbox with button that checks for exceptions and closes window
I am creating a GUI that will display the option to the user with a checkbox, and then after pressing the "Enter Data" button the program will check if the user has pressed at least one of the check-boxes. The checked values are being assigned to a…

Mechanical Engineer
- 15
- 6
0
votes
0 answers
How to channge label text from tkinter?
I'm trying to get the label called display to change the text whenever I press the button. My goal is, that it displays the value of gamer.trueCount, but I tried many approaches and I didn't manage to solve it. Could anyone help me?
from tkinter…

SenseiPingu
- 21
- 1
0
votes
1 answer
AttributeError: '_tkinter.tkapp' object has no attribute 'sidebar_button_event' error
I'm trying to modify the complex_example.py from the CustomTkinter website/github so that I can get it to eventually modify some file parameters that are used in a feeding machine for fish.
When I run the code in PyCharm I get the window that I'm…

Greg W
- 31
- 6
0
votes
1 answer
Tkinter - GUI: user text input with button that checks input for exceptions and closes window
I am creating a GUI that will accept user input in the text fields, and then after pressing the "Enter Data" button the program will check if the user input is a numeric (the input is later used later down the code). I am trying to make the button…

Mechanical Engineer
- 15
- 6
0
votes
1 answer
how to make buttons work while animation in tkinter?
i was able to create a canvas and use turtle to fill up the shape that i want inside of it. I was also successful in animating it, but now am not able to use the button which i created in the parent function. I also tried using "button-1" click…

vevek seetharaman
- 75
- 1
- 9
0
votes
1 answer
Display Pandas DF in Tkinter
I am working to create a GUI in Tkinter and am trying to display a Pandas Dataframe in the main root window when the specific button is pressed.
I currently have a 'Calculate' button that when pressed it displays the dataframe but it opens in a new…

Tristan
- 31
- 4
0
votes
1 answer
Tkinter button has an unremovable grey background
Tried removing the grey outline in all kinds of ways, but it didn't work.
Using Canvas: inserting buttons into the canvas, which is supposed to give transparent buttons according to this tutorial:https://www.youtube.com/watch?v=WurCpmHtQc4
from…

Tasin.c
- 111
- 6
0
votes
1 answer
How to update data individually on tkinter window?
I am creating GUI to show Temperature & Humidity from ip address. This is my mainwindow,
import tkinter as tk
from tkinter import *
from PIL import ImageTk, Image
import requests
from tkinter import messagebox
class MainApplication(tk.Tk):
def…

Kuralmozhi
- 47
- 7
0
votes
0 answers
text is cut off from some start letter on button
i m getting the song name from a directory , and it song names shows on a button text , but if song name is so large then it will cutoff some letters from start
def choose_file(ft):
a = filedialog.askdirectory(initialdir="~\Music",title="Choose…

Tejas Tikkas
- 1
- 1
0
votes
1 answer
Positioning of Tkinter Elements
I have a simple problem, but I'm not able to solve it. I've a tkinter GUI with 4 respectively 5 Buttons. There is a button in the middle, which choose an image. After the user chose the image the GUI will show so values below the "choose button".…

mklei33s
- 3
- 2
0
votes
1 answer
How do I execute a function in a parent file, from a child file?
I have a file that contains a class definition. This class definition stores Tkinter Button objects, and when these buttons are pressed, I need them to run a function in main.py. My file structure is as follows:
- main.py
- Classes (Folder)
-…

Lordimass
- 97
- 2
- 6