Category "tkinter"

How can I convert a return statement into a printable statement? [closed]

I am making a GFC (Greatest Common Factor) calculator with GUI, but my current code only works with a return statement, and tkinter doesn't ac

<B1-Motion> binding is unresponsive in Tkinter

I've been working on learning more about the Canvas() widget in tkinter, so I decided to build a simple paint app just for practice. To achieve this, I created

tkinter, or function to pass filename into variable for use in other function

My code below is to be used in a GUI that has two buttons. One to ask the user to locate a txt file, the other to run a function using that file to clean the da

Always tkinter Text highlight_patern not working [closed]

I've used this question but can't seem to do it again later. I call it with root.after later but then it does nothing. my code is: class Custo

Tkinter: access specifc widgets created with for loop

In my tkinter project I've created an Entry, a Label and two Buttons for each of the line in my line list using a for loop. I've also saved them in a list when

i get always a 0 as a returned value, can anyone help me to extract that value and use it for further calculations ,and thanks

this is the code , i get always a 0 as a returned value, can anyone help me to extract that value and use it for further calculations , i'm new in python espess

How to make multiple (more than 2) dependent Dropdowns in python

I have this case. There are 3 dropdown lists A,B,C. List A is independent. List B depends on value select in List A. List C depends on value selected in List B.

RuntimeError: main thread is not in main loop when tkinter GUI is closed

I'm trying to create a tkinter GUI that presents the 10 processes that are taking up the cpu, refreshing it every 2 seconds, similar to top, on the linux comman

How can I change the color of certain characters using tkinter in python?

I'm coding a brainfuck compiler and im having trouble updating the text color, as I want different symbols to have a different color depending on what they are.

Speeding up Python Tkinter Program

I have programmed an App with Tkinter on Python, that reads out a number of consecutive XML-protocols of a (literary) writing process and visualizes the same pr

Storing and using GUI objects with Tkinter

So I have a class that just creates a gui with a text box to type into. I would like to store multiple of these objects and their content that is entered by the

How do I (efficiently) update the text of a tkinter label that was procedurally generated?

I am making a restaurant menu program that pulls items and their attributes from a .json file, and then allows users to add them to a cart and export an order (

How to solve this lambda self python inside class

from tkinter import * class ticTactoe: def __init__(self): self.root=Tk() self.root.title("Tic Tac Toe") self.num=-1 for i

How to understand closure in a lambda?

I want to make 5 buttons in a loop, and for each buttons bind a commend to print the index. In the following solution it always prints the same index. My code

When designing a desktop app to be resizable, are there any hidden drawbacks to using two sequential Tk instances?

In order to ensure that my program will be compatible with any screen size, I first have a very small 'setup' window open when the program is launched, which wi

Game of the nim, minimax, game tree, data structure

There are 3 piles (1 pile - 7 matches, 2 pile - 5 matches, 3 pile - 3 matches) you can take any number of matches, but only from one pile, the

Generator is limiting

It runs, the TK design is fine but the generated code is limited to one type. What it currently does when it runs is pops up a window with (copy and Generate) b

Why does Tkinter image not show up if created in a function?

This code works: import tkinter root = tkinter.Tk() canvas = tkinter.Canvas(root) canvas.grid(row = 0, column = 0) photo = tkinter.PhotoImage(file = './test.g

labelled image object doesn't exist

I get the pictures from the wikipedia in a class and add them to the dict, when I want to return it and add the result to the label image, I get an error import

dateEntry to only extract the year from user input instead of daymonthyear? In Python

I am creating a GUI using tkinter in python and I want to print the date of what the user had selected using dateEntry. Here is what my code looks like: import