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
-
7
votes2
answers7019
viewsTkinter focus a window ignoring the back?
In my code there is a frame with a button and it is called "Open", when clicking "Open" another window will appear. The problem is that if I click on the window that this "Open" button again, it…
-
6
votes1
answer2821
viewsHow to modify a Label when writing in Entry on Tkinter?
I would like to make a program that detects the change in the Entry text and changes the Label to the same Entry text, as I can do this? from tkinter import * # Configurações da Tela window = Tk()…
-
5
votes1
answer1266
viewsHelp Tables python27
Good Morning, I’m new with Python/Tkinter and I have some projects in mind, but all of them have use of tables along with them, could anyone tell me if there is a library I could use to create these…
-
5
votes2
answers2507
viewsHow to put part of a text in bold in Tkinter?
I need to display a text in a GUI interface made with Tkinter, however, I would like only one word in the middle of this text to be in bold. I’m using it this way: texto = Label(Frame, text="Texto…
-
5
votes1
answer12643
viewscan’t Multiply Sequence by non-int of type 'float'
Error: can’t Multiply Sequence by non-int of type 'float' I am facing this error, I know it involves variable types, but I do not know how to make the entry receive a float type value…
-
5
votes2
answers801
viewsparameter master=None inside the class in module Tkinter (python)
I’m learning the Tkinter module in the course of Professor Neri Neitzke, No, I don’t understand what the parameter is for ( master=None ) no __init__(self, master=None) of the class below, could…
-
5
votes2
answers74
viewsWhat it really means "from modulox import *"
As far as I know it matters all the classes and functions of a certain file without having to reference it in the code, right? But I’m beginning to think from modulo import * doesn’t mean that. I…
-
4
votes1
answer766
viewsI cannot change the state of an Entry() widget in Python and Tkinter
In my code, my Entry() the state is originally as DISABLED. To enable entry, the user would need to mark one of the checkbuttons. Well, at least that’s the idea. What happens is I mark one of the…
-
4
votes3
answers3733
viewsSet width and height in text box
To expand knowledge, I decided to start a new programming language, Python, and locked in the following situation, I have a screen with some elements and a text box of type Entry. To define the text…
-
4
votes2
answers242
viewsProblems with python code
I am practicing Tkinter and what I want is to create a button where the user chooses an image and then pass this image to perform another function with opencv. But when executing the code, the…
-
4
votes2
answers207
viewsUse of multiple keys in Tkinter
Okay, I edited the question, this is the most simplified example, I wish that while the '6' key is being pressed, even using the '8' key, it continues to interact with the program, while '8' only…
-
3
votes1
answer867
viewsReal-time window update problem
Hello. I am creating a program that allows the user to know which note is singing and its frequency, in real time. However, during the window update, the program stops working and only updates after…
-
3
votes1
answer421
viewsTrigger an event after two clicks on button
I am developing a small interface in Tkinter, but I have the following question: Is there a mouse event that allows an action to be executed after two clicks consecutive on a button?…
-
3
votes2
answers2075
viewsChange color and border size Tkinter Menu
Can someone help me with this question?…
-
3
votes1
answer3054
viewsDynamically display jpg image in python Tkinter label
I am trying to display a chosen image of a Listbox on a Label. The following code works: import Tkinter as tk from PIL import ImageTk, Image window = tk.Tk() path = 'img\\2015722_univ_sqs_sm.jpg'…
-
3
votes1
answer726
viewsPython Tkinter text widget in another setting does not allow Insert
I am new to programming and python. I would like to insert a definition a box information that was created in another definition. How is that possible? According to the code, which is attached, the…
-
3
votes3
answers1598
viewsCountdown by using Tkinter
I’m trying to come up with a Tkinter show to count backwards. I can’t understand why I can’t take Entry and turn it into an integer. (As this is just a test, I did using Portuguese same) from…
-
3
votes1
answer2570
viewsHow to turn a . py into an . exe?
I have the following code : #coding-utf-8 from Tkinter import Frame, Tk, BOTH, Text, Menu, END import tkFileDialog from tkinter import filedialog as fd import dbf class Example(Frame): def…
-
3
votes1
answer3296
viewsHow to make a text fit the size of the Tkinter screen?
I am making an application on Tkinter and I need the text typed on a single label to fit the window size, because otherwise I have to stay using line breaking. Can someone help me? from tkinter…
-
3
votes2
answers1503
viewsMake server socket in Tkinter allow client input
The program works properly, it creates a server for your user, the server opens smoothly. But when I use a client to access it, the following message appears in the server client: Traceback (Most…
-
3
votes1
answer821
viewsImage overlay in Tkinter
I have a problem trying to overwrite an existing image in Python 3. from tkinter import * jan = Tk() jan.geometry("500x500") jan.configure(background="#f0f0f0") head = PhotoImage(file =…
-
3
votes4
answers6351
viewsHow do I capture each key typed in python
I am trying to make a program that captures the keystrokes typed on the pc, so that later I can access them. I don’t know where to start. I don’t know if you use sqlite3 (database), in google I…
-
3
votes1
answer581
viewsFlash text on Tkinter / Side effect
Hello, I’m starting my studies in Python, with the use of Tkinter. Take it easy on the answers / critics (rs!). I need to "blink" a text (Blink), with a value, when this is the fastest (lap record).…
-
3
votes2
answers179
viewsWhy should we import Messagebox explicitly into Tkinter even if it matters with the asterisk?
Whenever I see programs using tkinter and messagebox see the following two lines at the beginning of the code: from tkinter import * from tkinter import messagebox If we use from tkinter import * we…
-
3
votes1
answer285
viewsDoes the Python Tkinter library still exist?
I use Ubuntu and as this library does not come installed by default on linux, I was trying to install it via Pip but I can not find it on the official Python site.
-
3
votes1
answer54
viewsTkinter - set master in another script
I am creating a GUI with Tkinter and I am having problems separating functions from the main file (as it is getting too big). I created a new function file, when I try to import the creative…
-
2
votes1
answer87
viewspython font error 2x
I am trying to create separate fonts for my project in a particular.py file, after creating them I care for the.py project, I do it this way as follows: py. """ Criando as fontes. """ def…
-
2
votes2
answers322
viewsHow to access menu item from a menu
I would like to know how to access an item from a menu, to connect it with a function or Handler. For example, I would like to control the behavior of the application when I do click in the item…
-
2
votes1
answer113
viewsHow to make the cursor be in Text at the beginning of the program?
I would like to know how to blink the cursor on an object tkinter.Text when I walk the application, because usually no widget is selected. I would like to have the same effect as a terminal when it…
-
2
votes1
answer1015
viewsCustom window other than standard in python
hi, I would like an example of Python window, different from the pattern, as I do it ??? this is my code: from tkinter import = root = Tk() theLabel = Label(root, text="This is too easy")…
-
2
votes1
answer160
viewsProblems with Python Frames
I’m doing a college paper, and I’m having a hard time messing with Frames, more precisely I need to construct the graph below. In the code, you walk through it from commands EAST, WEST, NORTH and…
-
2
votes2
answers1748
viewsPython 3.5.0 ::: Delete a Label in Tkinter
I have a code that allows me to play to stone-paper-scissors. Here’s the Tkinter window: The result does not appear every time I play, because the label of this text does not disappear or delete the…
-
2
votes1
answer7183
viewsTkinter Window Management (Python)
i am making a code in which the main window has 4 buttons (Create, Manage, Delete and About) and I wanted at the time I click the button create isse to the creation tab without having to open…
-
2
votes2
answers1406
viewsRounded Tkinter button
Is there any way to round the button tips? Or even leave it as a circumference? Like this one for example:…
-
2
votes0
answers302
viewsPython 2.7.9 - Tkinter 01 module
Hello, below you follow the source code of my program, the question is this: How do I add functions and pair/connect with the submenus after the user’s click, being the same executed in the main…
-
2
votes2
answers5610
viewsMP3 player with Python
I know almost nothing about programming and so I have been studying new possibilities, such as POO and the like. Recently gave me a desire to try to learn GUI and also to create an MP3 player, all…
-
2
votes1
answer774
viewsHow to Update the value of a variable?
I made a function in which has an initial variable and according to which the user marks a checkbutton she takes this value stores in the variable and then picks and checks its value and deletes the…
-
2
votes0
answers354
viewsDynamic Text Label on Tkinter
I researched a lot here in stack and google, I spent all night looking for a simple solution but I did not find, I saw some ways to solve but none worked for me until now. Situation: I am creating a…
-
2
votes0
answers25
viewsDifficulty in execution
I’m doing a show Served in Socket Python using interface Tkinter, cannot exchange script information, to enter into the Tkinter. when I run both of them importing the socket I have no way to execute…
-
2
votes1
answer104
viewsHow to capture each key pressed in an entry with Tkinter?
Using the library Tkinter, i would like to perform a database search with each key pressed by the user in an entry, so that the result is automatically shown in a Listbox as I type. How can I do it…
-
2
votes1
answer175
viewsProblems to develop a Bricks Breaking-style game on Tkinter (collisions with objects)
I’m a few days studying and trying to get the ball to hit the rectangles from above they fade and invert the side from tkinter import * from constantes import * import random class Jogo(): def…
-
2
votes0
answers186
viewsRemove titlebar from Tkinter window
Good evening, the question is: how to shoot the title bar from the Tk window without making it background, which is what overrideredirect(True) does? With various researches, I saw that this line…
-
2
votes1
answer396
viewsRemove image background with Tkinter
I’m trying to make two layers with two images in which the background is whole in the application, and the second overlaps. The second is transparent, however, when the display occurs, it puts gray…
-
2
votes1
answer835
viewsPython 3: Tkinter - Background image does not exist, "pyimage1" doesn’t exist
My code to display a background image: from tkinter import * def entrar(): #Janela Principal janela = Tk() janela.title("Salvadados") janela.geometry('400x600') #fotofundo back = Label(janela)…
-
2
votes2
answers2695
viewsHow to select a Python file using Tkinter
I have the following Python code using the library tkinter: from tkinter import * class Application: def __init__(self, master=None): self.widget1 = Frame(master) self.widget1.pack() self.msg =…
-
2
votes1
answer69
viewsI’m trying to use the . split() in a def and I don’t know why it’s not working someone can help me?
I’m trying to build a simple raffle script using the Tkinter library. from tkinter import * def sorteio(): from random import choice nomes = (ed1.get) splitn = nomes.split(" ") sort = choice(splitn)…
-
2
votes1
answer983
viewsPython + Tkinter Screen Management
I’m creating a system with a few screens, Every time I click on the button to call the screen it creates a new instance of the same screen, so if the user keeps clicking on the same button several…
-
2
votes1
answer326
viewsCheck if Checkbox is checked
In the code below I have a Checkbox named cb. I wanted to know when it was selected/marked so that my program could run another account instead of adding. How do I detect that the Checkbox is…
-
2
votes1
answer190
viewsConnection Tkinter - Database
Good night! Guys, I’m starting in the world of programming and today I was following a tutorial that for me didn’t work and I don’t know how to solve the problem, I tried everything. This is to…
-
2
votes1
answer641
viewsHow to create maximize minimize and close buttons in Tkinter (Python3)
I would like to know how to create the maximize, minimize, and close buttons in Python (Tkinter). After the title bar is removed, new buttons must be created to customize the window and leave it…