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
-
2
votes1
answer205
viewsPython error using Tkinter
So I’m doing a little program for the mothers of students to calculate the average of their children however today I went to do a Gui with Tkinter and I only find old video to do a text or in case a…
-
2
votes1
answer149
viewsChanging button colors after click
Good afternoon friends, I am starting the studies in python and need to do a job using Tkinter. I have 64 buttons and I must change their colors according to the user’s click. It has 6 color…
-
2
votes1
answer69
views -
2
votes1
answer46
viewsHow do you put a Tkinter Text into a variable like str?
I created this code and intended that when I click on print, automatically write in Terminal everything you wrote in Text: from tkinter import * janela=Tk() #cores branco="white" preto="black"…
-
1
votes2
answers2221
viewsDynamically change label value
I’m a beginner in Python. How do I change the value of a label dynamically? To be more specific, I have the following code: #!/usr/bin/env python from Tkinter import * import socket, webbrowser root…
-
1
votes2
answers584
viewsIs it possible to create a communication between a Tkinter application and a pygame?
I know that tkinter is not thread-safe, but honestly I’m not quite sure what that means yet. We’re creating a game with pygame, and would like to integrate a menu initial and a console written with…
-
1
votes1
answer926
viewsSave text from a Tkinter Text object in a variable
I wonder if there’s a way to save the textual content of an object tkinter.Text in a string variable. Why? Because I believe the Tkinter.Text object is inside a function, and therefore it is not…
-
1
votes1
answer1855
viewsHow to clean the screen on Tkinter?
There is a practical way to "clean" a screen by giving a destroy() in all the widgets at once, without having to do it one by one?
-
1
votes1
answer450
viewsShow mailing list with Tkinter
I’m doing a show in Tkinter that’s based on an e-mail box. I intend, in a Tkinter window to show an email list based on a directory with files .txt ( which are emails). I have been looking for a…
-
1
votes1
answer161
viewsAdd shortcut to a Tkinter menu
I wonder how to add a shortcut menu item. I’ve been searching and seen it can be done using a special function common to all widgets in the module tkinker, that is to say the function bind. What I…
-
1
votes1
answer5597
viewsHow to remove a line from a text file
Hello. I am creating a program that opens, stores or deletes links. However, although I can remove the selected item from the link list I cannot delete the file line that corresponds to the selected…
-
1
votes1
answer62
viewsPython - How to get driver names C: D: F: I:
I’m developing a GUI in Python 3.6 using TKinter. I have reached an impasse where I have to get the letters of the installed drivers and their names the same way they appear in Windows Explorer. See…
-
1
votes2
answers684
viewsTkinter - How to save Entry() string
I have a problem about Tkinter, I am not able to save the value of an Entry() in any variable, so as soon as I can use the name of that file to create a TXT. Follow the code: def criarPL (): global…
-
1
votes1
answer781
viewsTkinter GUI hangs when loop
I am new to programming and have faced some difficulties to execute the code perfectly. I chose python for its flexibility. For some time I have been trying to create a macro with GUI, I use…
-
1
votes1
answer275
viewsProblem with Classes and Packages in python
I asked a question but resolved to improve it to have a better understanding,and also because no one could answer the fact that little explanation in this one I will be talking about the packages or…
-
1
votes0
answers124
viewsDestroy a container already created on Tkinter
I would like to know how to destroy a container already displayed on the screen. Like this: the program loads a container with the widgets and everything. However, when I make him create another…
-
1
votes1
answer1412
viewsPlay video stored in python web
Imagine that I have video in a directory of a site and not in a tag , example: www.site.com/video.mp4, I can play this video using python + Tkinter ?
-
1
votes1
answer466
viewsShortcut by initial letter Optionmenu in Python Tkinter
I have an Optionmenu in Tkinter in Python which is a large list, when I press the letter G for example it does not direct me to the elements with the letter G and also does not allow the use of…
-
1
votes1
answer535
viewsPython - Tkinter Module
I’m almost done with this little program, but what’s happening is this: in the "Tools" tab creates 2 submenus, in which I wanted to add submenus inside other submenus, I know it’s possible, but I…
-
1
votes3
answers2049
viewsHow to start full screen window with Tkinter?
from caixaimport import * # Variables # Tkinter Variables win_width, win_height = 1280, 1024 windows = Tk() # start a variable Tk windows.geometry(f'{win_width}x{win_height}') windows.title('SCH…
-
1
votes1
answer1022
viewsSend or Update button in Tkinter (Python) and Widgets Resizing
Start a code where you have 4 Checksbuttons and I want to do the following: (pseudo-code) user enters the database name, and selects what he wants => name, email, Cpf, color after that the…
-
1
votes1
answer608
viewsButton does not call function correctly
from tkinter import * class Application: def __init__(self, master=None): self.inicio = Frame(master) self.inicio.pack() self.msg = Label(self.inicio, text="Deseja exprimentar a versao input?")…
-
1
votes2
answers968
viewsPython 3.x Show typed data in an Entry on a Label only after pressing a button
I wanted to know the following; In my show, there’s: Entry1 -> where the user enters some information btn1 -> where it confirms the previously typed name and data is displayed on the console…
-
1
votes1
answer1024
viewshow do I put a Scrollbar in a python window as if it were a web page, the more content could go down Scrollbar
I wanted that when entering the program window using Tkinter, it would be possible to use a Scrollbar to search for more items in the window so that it does not get its limited height, being able to…
-
1
votes0
answers118
viewsHow to reduce the instruction block inserted within a conditional if structure in python?
Hi, I’m developing a program that calculates and sizes wall beams. It works basically with security checks (request less or equal to resistance), when one of these checks is not met, the program…
-
1
votes1
answer990
viewsHow to make the label background transparent ? python3 + Tkinter
lbl2 = Label(jan, font=("Arial", 12, "bold"), text="Escolha apenas uma Categoria por vez") lbl2.place(x=20, y=450) I’m putting this label on top of a green image, but it ends up with her background…
-
1
votes1
answer2070
viewsProgram closing immediately after opening(Post-compiled)
I’m starting to study Tkinter and compilation, and I have a basic Python notion, and I’m having some problems. Here’s an example of a basic program that, after compiling, the executable just quickly…
-
1
votes0
answers330
viewsHow to use while on Tkinter to make Par or Odd game?
I’m starting now and so I’m super lost, this and my code: from random import choice from tkinter import * janela = Tk() janela.title("Jogo do PAR ou IMPAR!") fontPadrao = ("Arial", "10", "bold") def…
-
1
votes1
answer265
viewsStandalone Python software ( .exe file) for non-python machines with GUI and Tkinter
I am developing a software using Python 3.6.5 and I need to run it on machines that do not have python installed. It contains some libraries for machine Learning and access and excel to MS. I have…
-
1
votes1
answer2280
viewsChange colors in program using Tkinter
hello, I need to create a function or maybe two to change the background color of the main window without interfering with subsequent events. wanted to add in the menu feramentas>environment:…
-
1
votes1
answer641
viewsPython-Tkinter. how to close a window using the code and not the close button?
there is some way to close the window created (container = Tk()) other than the button close? wanted to create by code, example: a login screen, when the login is done, the login screen closes and…
-
1
votes1
answer89
viewsTkinter Python stopping the script
Good afternoon, I would like to create a window with the words "Application running" and tried the following: from Tkinter import * root = Tk() T = Text(root, height=2, width=30) T.pack()…
-
1
votes1
answer3520
viewsSave text file in Python
I am creating a simple text editor with Python and Tkinter and I want to do a function to save what was typed. I made the save function, but it only creates the txt file and does not save what was…
-
1
votes1
answer146
viewsUse Variable in Button Attributes
I’m creating a small system in python3 using the Tkinter library, in this system there are many buttons and I would like to standardize the colors using a variable, so I don’t have to keep writing…
-
1
votes1
answer582
viewsHow do I pause a song in python?
I can make the program play the music, but the whole window is without function and only comes back to work when the music stops, that is to say creating a def button to pause the button only…
-
1
votes1
answer2705
viewsI can’t close the Tkinter Window
Well I am making a python application using Tkinter, I made a login window after checking user and password I would like to open a system window and close the login window. I’m breaking my head and…
-
1
votes1
answer565
viewsProblem with Geometry pack and grid (Tkinter)
to tell the truth these two geometries are very complicated, but unfortunately I need to use this 2 in this project. So come on. first follows the code: from tkinter import* from tkinter.ttk import…
-
1
votes1
answer904
viewsPython3 Tkinter method Stroy
good night, I was working on a project that involved a graphical interface and decided to use Tkinter to produce it I read about a method called Destroy() but could not find a way to use it the goal…
-
1
votes1
answer2400
viewsPython: Tkinter. Run button
Dear friends, good evening! See if you can give me an idea, please! Problem to be solved: I created the TKINTER interface for my program. This interface was in a separate file from the code. I would…
-
1
votes1
answer154
viewsImage does not open with Tkinter, how to solve?
I need this code to open an image in a label, but this error is returned: "Runtimeerror: Too Early to create image" from tkinter import * i = PhotoImage(file="ddddd.png") root = Tk() label =…
-
1
votes0
answers64
viewsdo a while loop or restart the program on Tkinter with new question
I would like to know how to do when click the reply button, restart the program with a new account and optimizing the code? from tkinter import* from random import randrange janela=Tk()…
-
1
votes2
answers941
viewshelp with storing value of a local variable in python
Hello, well, I am writing an application using SQLITE and Python, everything was going well until I had a problem that I am not able to solve, it happens that I have a db of the fipe, so I need to…
-
1
votes0
answers147
viewsHow to use Thread in my project with Tkinter and Selenium
I’m making a bot to get the free books that Amazon made available, so I created a graphical interface, but after discovering that Tkinter does not work the way I wanted, it also stops working when…
-
1
votes1
answer59
viewsTkinter, open only graphical interface
Hello, when I run a program I created using the Tkinter library in Python, it opens along with the graphical interface the console. You know how I just open the interface?
-
1
votes1
answer860
viewsUsing screens in Tkinter-Python
You guys all right? So, I’m doing a screen test program, its function would be just a test consisting of: Open a screen (called by a button) and close the one that was open. I don’t know how to do…
-
1
votes0
answers1062
viewsError: "sqlite3.Operationalerror: no such table"
I’m making the following mistake: sqlite3.Operationalerror: no such table: product I already checked in my database, the product table is there Code: from tkinter import * from tkinter import ttk…
-
1
votes2
answers262
viewsGuess Game Python Tkinter
I created a code in Python to present a puzzle game of numbers between 1 and 100. I wanted to implement this game in a graphical interface, using the Tkinter module. I had an idea, I created a code…
-
1
votes0
answers720
viewsHow do I check a login with sqlite3 + Python3?
from tkinter import * from tkinter import messagebox from random import randint import os import sqlite3 from tkinter import ttk con = sqlite3.connect('BancoDeDadosCadastro.db') cur = con.cursor()…
-
1
votes1
answer329
viewsHow do I make a button draw something new on a screen with Tkinter?
I tried to make a data simulator in Python with Tkinter that shows the data layout in the window after scrolling. For this, I defined a function that generates a random number from 1 to 6 and draws…
-
1
votes1
answer61
viewsI want to "capture" the path and use it in another program
I have a "ransomware" in which I put a path to a folder and it encrypts/destroys I have a paper to present in college where I have to create a graphical interface, created a simple screen, with 2…