Most voted "tkinter" questions
The Tkinter ("Tk interface") module is the standard Python interface for Tk GUI Toolkit. Programs written using Tkinter are freely portable between Linux, Unix, Windows and Mac.
Learn more…304 questions
Sort by count of
-
0
votes2
answers43
viewsRemove gray squares from my Tkinter program (Python)
I would like to remove these gray squares from my program. from tkinter import * import datetime import time import pygame, sys, random pygame.init() root = Tk() root.title("SISTEMA DE VENDAS")…
-
0
votes0
answers114
viewsGraphical interface with Tkinter slowing my code
I’m making a little script to automate some things on Windows only one problem I found is to close it (after having converted to executable with the auto-py-to-exe) has to make millstone trampo,…
-
0
votes1
answer132
viewsTkinter Entry always captures empty string
I am trying to create an application with graphical interface using the Tkinter. The graphical interface consists of a button, one text and of a entry, as in the image below. The idea is to type a…
-
0
votes1
answer305
viewsProblems running Tkinter program in Spyder IDE
I am writing a python code (3.7) using the Tkinter library, I am also using Spyder IDE (py-3) | Anaconda (3) to write the code. When I run it, the IDE only shows the [in] (runfile) in the ipython…
-
0
votes0
answers87
viewsHow to keep the last selection of a Tkinter radio button selected?
Good night! Is there any way to keep the last option clicked on radiobuttion buttons in python Tkinter lib selected? I would like, even when closing the program, when I opened it again, the option…
-
0
votes2
answers1552
viewsHow to show an image on Tkinter?
I want to add an image to the widget, but nothing appears, I tried to follow the same face https://stackoverflow.com/questions/28139637/how-can-i-display-an-image-using-pillow , but it doesn’t work.…
-
0
votes1
answer45
viewsMy Tkinter library buttons/buttons are not showing
I am studying the Tkinter library a little while ago,I started to create this code, when I create the first function "start" the code until it opens the window, but the Labels and button q I declare…
-
0
votes1
answer19
viewspython3 Tkinter flaw in the allocation of butons
good afternoon, I am trying to develop a graphical interface with python and for that I am using Tkinter but this arises a problem, whenever I try to assign a function to a button of the two one or…
-
0
votes2
answers241
viewsTkinter - pass argument to function
I have the following code: class Tela: def __init__(self, master=None): self.fontePadrao = ("Arial", "10") master = Toplevel(self.root) self.primeiroContainer = Frame(master)…
-
0
votes1
answer43
viewsHow can I write the generated data in different lines?
Example: I want a number in one line, then in another line. But all within the same generated text file. from tkinter import* janela = Tk() #################Cria o arquivo##########################…
-
0
votes1
answer177
viewsFunction to print directory on a Python Label
I created a function that opens a file with Tkinter + filedialog, so far so good. But I need to print the directory of the selected file on a label. Follows function: from tkinter import * from…
-
0
votes2
answers473
viewsHow to automatically populate a table field with a foreign key?
Good afternoon! Guys, I made a form where I take the data from this form and send it to two related tables. One of them is the registration table (only with personal information) and another address…
-
0
votes1
answer146
viewsHow do I run a web routine within Tkinter without crashing the mainloop?
Good day I created an application by Tkinter and now I’m trying to make the information on the web available to users in real time. The problem is that the app.run function does not let you run the…
-
0
votes1
answer67
viewsTkinter.filedialog does not work with Toastnotifier
I am creating a virtual assistant that communicates with the user through notification messages. I researched a lot on the internet about and found the win10toast. So far the program is working…
-
0
votes2
answers400
viewsGlobal variable for Python directory storage
Good afternoon Personal, I am creating a program in python using the Tkinter GUI that use several screens and in the GUI configuration I need to call some text and image files. I would like the help…
-
0
votes2
answers419
viewsPython project and Tkinter menu
Well my little project with python and the Tkinter library , I’m trying to make a registration system but I’m a little new in this part of object orientation in python, and I think this is the part…
-
0
votes1
answer315
viewsHow do I do a simple math calculation on Tkinter?
I’m trying to make a simple mathematical calculation in Python but when I try to use my code it doesn’t work My code : import tkinter as tk from math import * win = tk.Tk() win.title("Calculadora de…
-
0
votes1
answer202
viewsUse selected path in listdir
I’m starting to learn python (it’s actually my first language kk). I work with photos and I have a project to develop a photo renaming tool, but I’m having a hard time integrating some parts of the…
-
0
votes1
answer182
viewsRounding of decimal places float python
Hello, I am starting now to learn programming and I made a calculator that makes the calculation of the formula Bhaskara and it has interface, I used the Tkinter. My doubt is the following I wanted…
-
0
votes1
answer163
viewsHow to use user-clicked button text as input in Tkinter?
I would like to use the text of the button clicked by the user of my game to make a logical test and return another question to the user. The game will work with a sequence of these questions, and…
-
0
votes0
answers919
viewsTypeerror: Imgoriginal() Missing 1 required positional argument: 'self'
I’m creating a program using Python3 and Tkinter. As I am working with classes and the code is giant I cut out only the part that has been error. I set a function to be used as a Scale command in…
-
0
votes1
answer140
viewsHow to limit the number of lines in a Listbox in Tkinter
I’m studying about Tkinter and I came across a problem when I wanted to limit the amount of results that appeared on a Listbox. I looked it up online, but I couldn’t find anything on it. I am…
-
0
votes1
answer30
viewsTkinter interface appearing separate
The interface works, but appears divided; part of the code in one window and part in another. The code was originally generated with PAGE, but then I changed to either get rid of the support file or…
-
0
votes1
answer117
viewspython3 Tkinter scrollbar problems to insert
good morning, I was creating a graphical interface with python and for that I used Tkinter and I was trying to create a scrollbar inside my project but it does not recognize the command to connect…
-
0
votes1
answer100
viewsPosition reopening screen Python Tkinter
I am developing a program in Python and use Tkinter to create a screen as below: import tkinter as tk def on_closing(): cpos = str(root.winfo_rootx()) + '+' + str(root.winfo_rooty()) # salvo o cpos…
-
0
votes0
answers22
viewsdifficulty extracting content from a file in a folder
Good afternoon, I am using the textract library to extract contents inside a folder and for that I am using a function that inserts the beginning of the directory('./book') and the extension of the…
-
0
votes1
answer378
views(Tkinter) How to leave Labels, Buttons, and Frames with the tranparente background?
I’m trying to make a program in Python with Tkinter to make records and so on, but when trying to put a photo in the background image it is impossible to remove the white spaces that Tkinter does…
-
0
votes1
answer86
viewsPython3:Kinter:Button runs alone
good afternoon I was studying graphical interfaces in Kinter and this problem arose My interface has a simple button and its function was simply to print the contents of a variable that was passed…
-
0
votes1
answer91
viewsProgress bar only appears when the download ends
Guys, here’s the thing, I was doing a progress bar for a download of a file on the web, but it doesn’t work. When I run the code, the Tkinter window is locked and only returns when the download is…
-
0
votes1
answer310
viewsTkinter - Manipulation of buttons using PYTHON GRID
Good evening, I’m having difficulty with the module Tkinter in python, I’m creating an email generator and I need to position some buttons on the screen but the use of columns do not allow me to…
-
0
votes1
answer32
viewsCan I convert the output of an object using get()?
How do I convert the output of an object when using the get() function? Since it always returns a value string. Here’s a code I’m writing: import tkinter as tk import Sistema_backend top = tk.Tk()…
-
0
votes1
answer42
viewsAsync and Tkinter function
I’m trying to integrate the async function of the Telethon below to the command of a button on the Tkinter, but I don’t know how to proceed... The function below works for sending message at the…
-
0
votes1
answer368
viewsHow to update the Tkinter window?
I made a program that plays dice. I used the graphical library Tkinter to create buttons and Labels. I use the button to activate a function that generates a random number, but the label does not…
-
0
votes0
answers108
viewsHow to run Selenium and Tkinter at the same time without stopping to answer
Good morning to you all! I have a python code that I use from Tkinter and Selenium to get all the books that Amazon recently made available for free, but Tkinter stops responding as Selenium opens,…
-
0
votes1
answer47
viewshow to trigger a function via another function
i am making an app with Tkinter and need to trigger a function using another: import pynput import datetime import tkinter from tkinter import * import pyautogui import time from pynput.keyboard…
-
0
votes1
answer44
viewsCreate links that can be copied or clicked on Tkinter
I created a script basically to replace links by removing some special characters. It’s functional. The problem is only the data output, because I am putting to present a label, with the link…
-
0
votes0
answers43
viewsCreate fields dynamically
I’m learning Python created a screen and inserted some fields, but when I try to create a routine to automate, make more generic I can’t. follow the code, if you can help me, thank you. from Tkinter…
-
0
votes1
answer39
viewsWhy does the background color of my Frame not change during the execution of my application in Tkinter, even with the setting of the bg parameter?
from tkinter import * class Teste(object): def __init__(self): mestre = Tk() mestre.title("Aplicação de teste") mestre.geometry("400x400") mestre.resizable(False, False) #Frames self.frame1 =…
-
0
votes1
answer54
viewsShow UTC time in an Entry Widget
I would like and was trying a way to show the time by updating myself, through an entry on Tkinter. I set up a function for this but I can’t get it to appear in Entry, instead it appears "Function…
-
0
votes1
answer79
viewsRun event on Tkinter button
I’m having trouble getting the button to run a def and make a simple encryption and then display on the screen. import tkinter as tk from tkinter import * class Application(): def __init__(self,…
-
0
votes1
answer135
viewsPython - Inventory system
I’m making a mini example game to learn more about python, and I don’t know how to remove the self.canvas.create_rectangle(50, 200, 290, 80, tag='inventario', fill='yellow') (INVENTORY ACTIVATED), I…
-
0
votes0
answers47
viewsGif with Tkinter
I have a problem here.. I’m trying to make two gifs stand on top of each other when called, simulating a sensor. When it doesn’t detect anything, it shows a gif, when detected, it shows another gif…
-
0
votes0
answers26
viewsHow to put image Buttons on an image using Tkinter?
Hi, I’m developing a game and I need buttons with images to appear on another image. These buttons also need to switch between different game screens. However, I just can’t get the buttons to appear…
-
0
votes1
answer79
viewsHow can I pass data from one Tkinter window to another?
I have two Tkinter Windows, and I want to pass the dice from one window to the other window. Code from the first Window: from tkinter import * from get_pos_mouse import Get_Mouse_Pos class…
-
0
votes0
answers15
viewsIs giving problems when using Tkinter in windowa
I ran this program on my mobile and it ran well, I went riding on PC (Windows) and gave a problem, can help me? from tkinter import * from tkinter.filedialog import * from tkinter.font import * from…
-
0
votes0
answers24
viewsHow do I erase that edge on Canvas?
I want to erase this edge that’s around Canvas, but I can’t find which attribute determines its existence. Could someone help me? The code: class Tela(): def __init__(self, resolucao:str): self.inst…
-
0
votes0
answers22
viewsQuery Sqlite3 tables using python3 and insert the results in a Treeview in Tkinter
The purpose of the code is to do Sqlite3 searches between two dates and insert these Tkinter Treeview searches. I have the second table in sqlite3: CREATE TABLE "MOTO_PALIO" ( "cod" INTEGER, "data"…
-
0
votes1
answer77
viewsEven if you get it right, the message doesn’t change!
I’m trying to create a game in Tkinter, it’s simple thing, you kick a number and then a message appears if your kick is right or wrong. I already did this in CLI, however, I went to try to make a…
-
0
votes0
answers12
viewsHow to fix a window over others with Tkinter
I would like to leave a fixed window on all others that are also open and maximized, even if the user clicks on other windows. The language is Python with the Tkinter library. Here is a minimally…
-
0
votes1
answer20
viewsHow to change what is written on a Tkinter. Text in Python?
In a tkinter.Entry, to change what is written I could put a StringVar in a textvariable and I could change this StringVar there is any moment that would be changed in the tkinter.Entry also But in a…