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
-
1
votes1
answer463
viewsNameerror: name 'Window' is not defined
I’m following this PDF, I’m on page 10, the code is wrong and I don’t know why. from tkinter import * class Janela: def __init__(self,toplevel): self.fr1 = Frame(toplevel) self.fr1.pack()…
-
1
votes0
answers361
viewsI have a little problem with listbox - in Tkinter
Good morning, I have a question about the listbox on Tkinter. my code is working fine, there’s only two things wrong and I’m not getting it fixed. first that when I click the delete button, the…
-
1
votes1
answer225
viewsPython - Button depending on box
I started with designing a program to learn how to program, however I’m having a hard time doing the following: The person places the information in the text box The Button fetches this information…
-
1
votes1
answer485
viewsHow to capture parameters of the object that called an event in Tkinter?
I have 3 buttons, two with the same name and one with different name and each with its properties, I would like to know how to capture the text of each button in the same definition. Of course, I…
-
1
votes0
answers74
viewsHow to make a button flash Tkinter
I’m trying to make a screen where the buttons blink at certain frequencies. I couldn’t find any function that answered. Can someone help me, please? Follow the code I’ve made for now: from tkinter…
-
1
votes1
answer1504
viewsCreate buttons for each item in a python list using Tkinter
I developed a software that sends consumer data to a database. I made another application to receive this data and generate a graph. My goal is to create specific button for each consumption day.…
-
1
votes0
answers53
viewsCheckbutton - I can’t leave just one option checked..... when I mark an option in step 15 marks all together.... Someone can help me...
passo = 0 msg = 'Iniciar Nova Classificação' msg_button = 'Sim' dados = ' ' dd = ' ' mm = ' ' aa = ' ' barra01 = ' ' barra02 = ' ' ckb1 = ' ' ckb2 = ' ' ckb3 = ' ' ckb4 = ' ' sim = False nao = False…
-
1
votes0
answers303
viewsValueerror: could not Convert string to float
Hello I’m trying to make an application in Tkinter/python and I can’t get the code to return the result of the calculation. the code created is the following: from tkinter import ttk from tkinter…
-
1
votes1
answer432
viewsHow to add a Matplotlib chart on Tkinter
I have a graphic of matplotlib put in format (pizza) and I wanted to take the picture and add it to Tkinter matplotlib.use("Tkagg") DataBaser.cursor.execute(""" SELECT RendaMensal FROM Registro…
-
1
votes0
answers338
viewsFrame Tkinter Python does not stand next to another frame
Well, I’m having a problem assembling my simple graphical interface for a program. I’m doing it with Tkinter using python 3 and a frame just doesn’t sit next to each other! I have tried to put…
-
1
votes0
answers63
viewsConnecting modules and packages
I am trying to implement a GUI with python3x and Tkinter in separate scripts. I have a gui_test folder organized as follows: Gui (sub-folder): Unit.py and app.py (Tkinter) utils (sub-folder):…
-
1
votes1
answer320
viewsHow do Tkinter wait for user interaction during the script?
I am learning Python on my own and now I took it to learn GUI in Tkinter. If anyone can help me, I’m having trouble getting the program to display a greeting and then offer options on different…
-
1
votes1
answer510
viewsHow to change location buttons dynamically using Tkinter?
I know that this code has a lot of repetition and I intend to "dry" it later. For now, I want to understand how to change the position of the buttons in Tkinter dynamically. The solution I initially…
-
1
votes1
answer35
viewsHow to invert a shape in Tkinter
Hi, I wanted to find out how to invert inside the canvas (Tkinter) a Poligono. from Tkinter import * Tela_principal = Tk() Tela_principal.geometry('300x300+10+300') area_2 = Frame(bg='snow',…
-
1
votes1
answer139
viewsTurning binary into a Python chart
Good evening I have a message that I turned into binary and wanted to make a graph from the following patterns ami pseudoternary, where if the binary digit 1 the frequency is 0 and if the binary…
-
1
votes0
answers62
viewsIf Else being ignored
I’m starting now on programming... I drove the Bugger and noticed that the if/else (# TKINTER RESULTS GRID) is being ignored, finishing the code without any error in the console. I tested some…
-
1
votes1
answer37
viewsHow to use a Tkinter Checkbutton to interact with a Pandas dataframe
I’m trying to make an interaction with a dataframe in Pandas, I’ve tried several solution options I found here in stackoverflow, but I haven’t been successful yet. If anyone can help me, I’d be very…
-
1
votes0
answers41
viewsAlign columns inside the listbox (Tkinter)
I’m using this turorial to start a project: tutorial sqlite I’d like to line up the columns inside the listbox, I’ve tried some unsuccessful ways. from tkinter import * class Gui(): """Classe que…
-
1
votes0
answers11
viewsHow to call a new frame after checking an input box entry in Tkinter?
Good morning! I’m making a game where the user needs to enter the passwords he discovers in the course of the game to unlock new screens. However, I’m not getting my password-checker button to work…
-
1
votes0
answers28
viewsHow to call data from a dictlist into code in the form of Checkbutton in python Tkinter
Reformulating everything, I created a new file from scratch called "dict_list_codigopenal.py", he is responsible for taking the file "cdp.csv" and read as spreadsheet, transforming into a Dict list.…
-
0
votes1
answer388
viewsUser Choices in Tkinter
Hello. I am trying to create a program of graphical interface using Tkinter(I learned a little while ago) and I wanted the user, when writing in the text input box and pressing the button he printed…
-
0
votes1
answer514
viewsGet cursor position in Tkinter Text widget
I wonder how I can get cursor coordinates on an object Text in Tkinter. For example, suppose I have this text: Hello, how are you? It’s all right. [CURSOR] How do I get the row and column of…
-
0
votes1
answer2285
viewsText position in Tkinter
Hello. I am working with Tkinter and I am at an impasse. I have nine buttons and each one prints a number. How can I make it so that after I press a button, no matter what button I press, a number…
-
0
votes1
answer429
viewsControl whether a Tkinter. Text is empty
I’m trying to create a simple notepad, but I have a little problem: when I try to see if the text of an object Text is or is not empty: if text_area.get(0.0, tkinter.END) != "": print("Text não…
-
0
votes2
answers3130
viewsPython - Module: Tkinter - window manipulation
as every good new programmer, at the beginning comes up many ideas and, one of them was the following: how do I manipulate windows? how so? remove the rounded corners when running on Windows 7.…
-
0
votes2
answers328
viewshow to make the time appear in the window(label)?
I have the following "timer" code, but it does not appear in the window, only in the Python 3.6 console. How to make it be printed in the window? (Obs.: the window only opens when the preset time is…
-
0
votes1
answer108
viewsDisplay the value of a counter in a table
Long live, The goal is to simulate the iteration between the system and the user, and for that I need to know how many repetitions were performed in each test scenario. I keep my code down, Defines…
-
0
votes1
answer1296
viewsPython Tkinter: Window works perfectly but does not close after performing a function
code: def editar (self, event=None): ob = self.buffer(opcao=2) if (ob[1] == None): return elif (ob[0] == None): return root = Tk() root.withdraw() for o in self.lista: if (ob[0].codigo.upper() ==…
-
0
votes0
answers35
viewsHow to insert Weather Underground forecast icons
Good afternoon I’m trying to insert the Weather Underground icons but no Python 3 icons. Below I leave a part of the code. url =…
-
0
votes1
answer141
viewsSave contents of a Listbox to mysql database
Good morning, I have a listbox and I’m having a hard time storing the contents of that list in the Mysql database. Someone could help me. I followed code and error below: def SaveVariosCodBr(self):…
-
0
votes1
answer678
viewsHow to convert a string to an integer in a socket program?
Here is an excerpt from the code: def CriarServer(self): Host = self.Txt1.get() Port = self.Txt2.get() sockobj = socket(AF_INET, SOCK_STREAM) #Erro sockobj.bind((Host, Port)) sockobj.listen(5) while…
-
0
votes1
answer10442
viewsHow do I import Python image with the Tkinter GUI?
How to place an image in the Tkinter library widget?
-
0
votes1
answer2903
viewsAdjust Tkinter window and widjets according to screen resolution
Hi, I’m developing a python GUI with Tkinter. I’m trying to get the widgets setup I set up to fit the monitor resolution. I applied the following code. janela = tk.Tk() lado, cima =…
-
0
votes0
answers60
viewsHow to update an image in Tkinter
Hello, I would like to know how to have an image on my button when I press it and another image when it is not being pressed.
-
0
votes1
answer71
viewsHow to make a window stand above all?
I don’t know if it’s possible to do that, so I’m not even gonna put a code in here. My question is this, if it is possible to make a window stand in front of all the other windows, and I am not…
-
0
votes1
answer527
viewsTkinter function running even without clicking the button
Here is my code: from tkinter import * from tkinter import messagebox def add(a, b): messagebox.showinfo("Resultado", a.get()+b.get()) win=Tk() win.geometry('300x200') a=StringVar() b=StringVar()…
-
0
votes2
answers45
viewsTwo doubts about Kinter
I have two questions about GUI Tkinter. The first is: how do I stop when the text of a label is larger than the label size, the text instead of being missing, continue on the next line. The second…
-
0
votes1
answer72
viewsswitching from one entry to the other when typing a word
Guys, help me with this, I have two entry and I need that when I type a word for example (Python) it changes from one entry to the other automatically from tkinter import *…
-
0
votes1
answer61
viewsTkinter, how to use the same script in win and llinux without the window icon getting in the way
I’ve been writing some scripts in Win VS and when I switched to Linux, I came across the following problem: When I use an image as a window icon in Linux (which does not have it), the script does…
-
0
votes1
answer213
viewsHow to make the elements of a tuple to be the arguments of a python function?
I will first remove the problem and then explain what I am trying to do. If you know how to answer the short problem, you don’t need to see the rest. Is there a way to pass the elements of a tuple…
-
0
votes1
answer912
viewsTake off or move a frame in Tkinter(python)?
I have a problem in python code that is the following, type I want to move the frame of the entry checkbutton so I can not, if you can help me, run the code there for you to understand the problem.…
-
0
votes1
answer202
viewsScreen printed products in Tkinter-Python
I’m having trouble getting back to one screen without creating another... I couldn’t get her to come back to the same screen I created. I wonder if I could use the .destroy()? Follow the code below:…
-
0
votes1
answer669
viewsButton Bind in Tkinter.ttk Treeview in another Class
Problem How to create a button bind class in ttk. Treeview? Sample Code When programming the main class, which defines Treeview and then create another class that defines bindings and events. It is…
-
0
votes1
answer1721
viewsScreen Transition - Tkinter
Let’s say there is a screen with three buttons (Tkinter), each calling another screen when clicked. How to switch between these screens without getting that aspect of destroyed screen and a new…
-
0
votes1
answer1673
viewsProblem per image on a Tkinter button
I want to put image on buttons,I’ve done this way before,but agr n is working. Can you help me? **Detail: **In the same window of Tkinter is instantiated the screen of a Turtle. def images(self):…
-
0
votes1
answer1902
viewsProgress Bar - Tkinter
While processing takes place, the screen has to display a progress bar pro user. What is the logic behind this (Python, Tkinter)? How to make the progress bar appear on the screen while processing…
-
0
votes2
answers443
viewsHow do I take data from an Entry and add it to the Database (sqlite3)
from tkinter import * jan = Tk() jan.title("Dados") jan.geometry("200x200+250+100") label = Label(jan, text="Nome:") label.grid(row=0, column=0) nome = Entry(jan, width=25) nome.grid(row=0,column=1)…
-
0
votes0
answers319
viewsHow to stop a progressibar in Tkinter
I have always developed in JS to half lost here in Python, if you can help me... I wanted to let the button close without an event until the progress bar is finished, and the progress bar at the end…
-
0
votes1
answer51
viewsHow do I hold forever when the <Down> key is pressed and gain +10? (Python3 + Tkinter)
from tkinter import * from tkinter import messagebox jan = Tk() jan.geometry("500x500") Quadrado = Frame(jan,bg="#B0C4DE", width=25, height=25, bd=3,…
-
0
votes1
answer41
viewsHow to recognize the selected entry
I have two data entries (password.entry,id.entry) and I want to make the program recognize which of these fields is clicked and enter the value that is inside a button in this selected field.…