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
votes0
answers71
viewsTkinter==>Label/Msg present only 1 item in the list. How to resolve?
Well, the goal is to make, on the same label or msg, all the items on the list appear. I’m not very experienced at Tkinter, so I don’t know if there’s a limit to that. Follow part of the code below.…
-
0
votes2
answers901
viewsHow to hide a Widget?
I need to know some way that by clicking on Button "hide" a widget (a Label for example) from my window, being possible to use it later; Using place in widget you wish to "hide" (Yes, MUST be the…
-
0
votes1
answer245
viewsMovements in the python Tkinter
I’m liking python, and I wanted to make an interface where there’s a ball that’s hitting the walls, only I wanted to know how I can make the ball hit the walls. from tkinter import * import time…
-
0
votes2
answers602
viewsObject orientation in python
I’m a beginner in Python, I took some courses and I’m trying to learn Tkinter, I found a playlist on youtube with a guy who made a BTC trading app with Tkinter and he created a class to open more…
-
0
votes0
answers108
viewshow to solve problems with "referenced before assignment"?
from tkinter import * from tkinter import messagebox jan = Tk() jan.title("Pontuacao") jan.geometry("200x200") pontos = 0 a = Label(jan, text="pontos") a.place(x=0,y=0) def aumentar_pontos(): pontos…
-
0
votes1
answer508
viewsHow do I focus on Toplevel open Tkinter?
In the Help menu, I’m opening as many windows as I click to open, this wasn’t supposed to happen. I tried to adapt something of this post: Tkinter focus a window ignoring the back? , but I couldn’t,…
-
0
votes1
answer278
viewsI cannot delete record of the sqlite database selected in the listbox
After formatting the record display in the listbox ('{} Cellular: {}'. format(name, cell phone). lista = self.cur.execute("SELECT * FROM lista") for nome, celular in lista: self.listbox.insert(END,…
-
0
votes1
answer1885
viewsTkinter how to change color of text
How do I change the color of a label to make the background black and the letters white ? I researched and what I found was the option to change the background to black however beyond the label…
-
0
votes1
answer42
viewsHelp Tkinter opening a Python application
I made a separate menu to find my applications and it opens normally, but if it closes I can’t open it again, just by closing the menu application. from tkinter import * def Cadcordenadores(): from…
-
0
votes0
answers40
viewsHow do I update a button when attending an external event?
I made a small application where it communicates with an external drive consulting some boolean variables. Depending on the status of these variables, a button is placed on the screen and a picture…
-
0
votes1
answer854
viewsPYTHON - how to use a loop without stopping Tkinter
I have this program which is a kind of 'Force Brute' (I automated a process of clicking on a place, typing a number, and clicking elsewhere with @Pyautogui), I need to use a loop but when the loop…
-
0
votes1
answer167
viewsHow do I import text source files into Tkinter in Python?
I want to know how I can import the source file using Tkinter, so that no source problems occur on other systems. Because if I send it to a friend, he won’t be able to see the selected source if he…
-
0
votes1
answer122
viewsWhen I run code outside of IDLE (PYTHON 3.7) the created Tkinter window does not appear
I’m beginner and was studying Tkinter and developed this code, within IDLE it works perfectly, but with advancing I turned it into executable but does not rotate, even inside the cmd does not…
-
0
votes1
answer295
viewsMinimize GUI in System Tray - Python 3
Good night I made a GUI with Tkinter in python 3. I wonder if it is possible to close the window, the application was for Windows System Tray? Is there a lib or command within Tkinter for that.…
-
0
votes1
answer40
viewsHow not to lose data from the app on Tkinter?
I developed a notepad app, but every time I close the app it erases all the annotated tasks, how do I make it not happen?
-
0
votes1
answer699
viewsTkinter, how to update label on canvas?
Hello, I am trying to build a dynamic table that updates the values automatically but I am not able to update the Labels, I am using the following code: import tkinter as tk def populate(frame):…
-
0
votes2
answers720
viewsPython 3 and Tkinter: progress bar does not update during script execution
Hello. I am creating a layout converter using Python 3.6.4 and Tkinter. Among other things the GUI must have a progress bar that updates its value with each interaction of the conversion process,…
-
0
votes1
answer262
viewsTkinter locking into function
I am making a mini-program to be used in the working hours/study style the Pomodoro method. I made it very simple, fast, but when I press to start, the program hangs exactly the time that was put…
-
0
votes1
answer26
viewsLarger Image than the Frame
I need the image of a graphic, just stay inside the green frame, I can see the whole picture. Can anyone help me complete this goal ? Below is the function attached to the Seletionsort button, which…
-
0
votes1
answer25
viewsPython3 Tkinter error
good night, The idea of this code is to insert an image in a graphical interface but this always giving the error and says that can not open the image Someone knows what’s going on? this is my code…
-
0
votes2
answers3404
viewsTake a Tkinter entry and save to a variable
I made this initial window where I took the data, and when the client used it, after providing the data and confirming it, it closed and kept the data saved in a variable that was not tied to an DEF…
-
0
votes0
answers149
viewsHow do I make my music player choose an mp3 file and play it?
I’m having trouble making the program choose the music and play the selected music from tkinter import * from tkinter import messagebox from tkinter.filedialog import askopenfilename from pygame…
-
0
votes1
answer104
viewsHow do I add an image to a python script using Tkinter
I’m trying to add an image to a program with the following code: from tkinter import * root = Tk() imagem = PhotoImage(file="imagem") lb = Label(root, imagem=imagem) lb.place(x = 0, y = 20)…
-
0
votes3
answers258
viewsTkinter: Tk() not found
When trying to call the function Tk(), it is not recognized by showing the following message: Nameerror: name 'Tk' is not defined I’m trying to start the following code: from tkinter import * root =…
-
0
votes1
answer231
viewsI can only open png images with Tkinter
I’m trying to open up images jpeg with Tkinter using the PhotoImage, but I can’t. The program and image are in the same folder, but still it gives error: couldn’t open "image.jpeg": no such file or…
-
0
votes0
answers35
viewsFunction being called before being called by GUI
I have a software that I am using Tkinter as GUI, to receive some parameters that the user will pass me. In this software I have 1 problem and a doubt. the problem is this, just when I run the…
-
0
votes3
answers238
viewsUpdate label every time you click a button
I’m using the Tkinter library for the program interface, so on the screen I would have a label that starts with your text represented by a variable of value '10', so at the click of a button, I…
-
0
votes0
answers110
viewsCollision problems in Tkinter (game)
I’m learning Tkinter developing a little game but I’m in trouble to erase objects collided with find.overlapping from tkinter import * from constantes import * import random class Jogo(): def…
-
0
votes1
answer701
viewsUsing Tkinter together with a database
I am doing a program of registration of people with interface (still very basic, just to do tests) and I am with several difficulties: I’m extracting the data using the .get(), however, I can only…
-
0
votes1
answer414
viewsPython - Tkinter - Dynamic Checkbutton does not take the value of the variable when referenced from another file/screen
I’m having the following problem: I can get the value of a dynamic variable (checkbutton) when the whole program is in one file with only one function: import string from tkinter import * import…
-
0
votes1
answer82
viewsModule named 'Tkinter' not found - python
I started messing around in the library tkinter python recently, but I can’t because the library is not found. The error message shown is as follows: ModuleNotFoundError: No module named 'tkinter'.…
-
0
votes0
answers293
viewsHow to implement a python socket code without using while true?
I’m doing a chat in Phyton that has the Guis implemented with Tkinter, according to the errors I had and by what I researched about the Text module of Tkinter (module where the messages will be…
-
0
votes1
answer1976
viewsCreate a mini CRUD (basic) in Python Tkinter
my name is Victor, I’ve researched the Treeview but I couldn’t do anything, but my goal is this one: I made an illustrated example follows the code: from tkinter import* class principal: def…
-
0
votes1
answer324
viewsHow to use Sleep for a Tkinter graphical interface loading effect
I’m willing to use the Sleep module team provides a load/wait effect on checking a condition. No use of Tkinter, the effect works perfectly, however, when I try to do the same with the Label of…
-
0
votes1
answer84
viewsHow to print typed text in a Tkinter GUI on the console?
I wanted to create a text in a window and, pressing a button, my text appear on the console. My code is this: from tkinter import * class janela: def __init__ (self, janela): self.frame=Frame()…
-
0
votes1
answer31
viewsProblem with scope of variables in child class
I created an interface with Tkinter to use as Environment for my studies with reinforcement learning. My goal is to run the class that creates Nvironment and with an external loop, send actions to…
-
0
votes0
answers16
viewsTkinter Python - Json + Entry
I am trying to create a window with 3 Entry, and 2 buttons, one to open a JSON and load some data into these entrys and the other button to save the changes in JSON. Save button and Entry positions…
-
0
votes2
answers344
viewsname is not defined - name/variable undefined, Tkinter and slite3 help
I’m starting to study sqlite3 in Marra, and this being difficult, but I already got a few things, the problem is that when compiling the program appears the following error: "name 'adic' is not…
-
0
votes1
answer901
viewsHow to delete a table row in sqlite3?
I’m trying to crud sqlite3 with a GUI through Tkinter my table was created in DB Browser for sqlite. I’ve developed a little but it’s not working: from tkinter import * from tkinter import ttk…
-
0
votes1
answer806
viewsCollection of float type data from an Entry Widget - Python Tkinter
I am developing a program for civil engineering calculations and I have a problem in the result collided in an Entry Widget, that same Entry is with you in an if condition as shown in the code…
-
0
votes1
answer363
viewsHow do I animate an object on canvas with a bind with an animation already "running"
I was making a copy game of Space Invaders but when I went to do the "shot" of the ship, I came across a following problem : As seen in Gif, when I press the key, everything on the canvas "freezes"…
-
0
votes1
answer257
viewsProgram lock when executing function. Tkinter + Python3
It is the following I created a simple program to break md5 numeric, but the same lock when I click on descrypter and it only works again when it finds the hash, but it is locked until finding and…
-
0
votes1
answer830
viewsPython: Tkinter + SQLITE. Save records to database and clear field
I am studying, on my own Sqlite, I already bought some courses, but I need a help. Objective: I would like to save the user typed fields in the database and then clear the same fields to allow new…
-
0
votes1
answer1528
viewsPython 3 Tkinter: How to get a value/string from a Radiobutton inside a function?
I would like to take selected sex value and print in the Datatargets window, but it doesn’t work, not even the other data typed as name or age. I have here a main window where will display two…
-
0
votes1
answer714
viewsMenu in the Tkinter Python module
Hello, I have a screen that was made in Tkinter and I have a menu with cascade submenus, what I need to do is show the different information of the submenus without having to create several other…
-
0
votes1
answer354
viewsImporting values from other codes in Tkinter - python
Hello, I’m doing a large program and wanted to divide the screens into other codes, I can import the screens, but I need to get some values from other screens, but I can’t do it. First screen: from…
-
0
votes1
answer110
viewsError in transition of Tkinter screens
Hello I’m new to python and I’m developing an application that has access to dblite3, I managed to add another screen more when I make a connection with my db it goes back to home screen, I wanted…
tkinterasked 5 years, 9 months ago Railsn Souza 1 -
0
votes0
answers235
viewsTkinter: Treeview with repeated values after pressing "query" button
Every time I press the "Query" button treeview updates, but also by adding previous Rows. def consultar(): #função que Mostra na treeview todos os produtos cadastrados conn =…
-
0
votes1
answer321
viewsTkinter Python Toplevel
I want to make the btnteste button modify the text in the label(root), I am unable to do from tkinter import * root = Tk() root.geometry("800x600+600+200") root.resizable(False, False)…
-
0
votes1
answer340
viewsHello, in Tkinter how to take the value of the sum generated by numbers and compare with the user input?
from tkinter import * from random import randrange, uniform window = Tk() window.title("Welcome to LikeGeeks app") window.geometry('800x600') lbl1 = Label(window, text="00", font=("Arial Bold", 50))…