I am making a random number guessing game with GUI (Tkinter) and this comes up RuntimeError: threads can only be started once. I’m trying to kill the thread but I can’t find any way. Here’s the code: In the first function (main) is where I call the Thread and in the second function (process) is where I want to kill
Tag: tkinter
from tkinter import * showing SyntaxError when used inside function
Here I am using from tkinter import * inside a function and when I am running the code it is showing me a SyntaxError. Please tell me how I can use from tkinter import * inside a function. Answer You should move the import statements to the beginning of the file, at the top. You are also importing tkinter twice.
case-insensitive treeview sorting
I am using below code to sort the treeview column but it is case sensitive i.e. if the column value is [a,c,A] the sorted value will be [a,c,A]but i want it as [a,A,c] and even the number sorting is only based on first digit i.e. if [2,1,11] is the column value, the output will be [1,11,2] what i want it
Setting row of multiple buttons created by for loop with tkinter
I am trying my hand at making a GUI with tkinter and so far I’ve been successful. I need to make 4 buttons appear in my window I’ve created and i’ve placed them using .grid(). Their column is the same so it’s not a problem but I don’t know how to set their different rows much cleaner. I have typed
Can’t define class in python [closed]
Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed 2 years ago. Improve this question CODE:: Error:: Traceback (most recent call last): File “C:/Users/Jedi/PycharmProjects/LMS/main.py”, line 5, in class
TKinter doesnt execute command based on answer
Introduction Im making custom Dialogue usign TKinter Templates. somewhere’s in the script, there’s MessageBox so users can determine wether its should aborted or continued. Here’s the code : import …
tkinter: How to create a class object with a function called by a Button?
I created an entry where I enter some value. By clicking the submit button I want the function create_object to get the entry value, then an object of the class Test_Class is created with the gotten value as a parameter and the object is returned. But obviously that object has not yet been created and therefore cannot be accessed, right?
How to stop a GUI from being automatically resized?
I wrote a calculator app by using Tkinter. The problem is when I click numbers or operators etc, the whole GUI resized automatically. Actually, I think the width of the label must fix in some way. I tried to use a frame as the parent for the label but it didn’t work. Should I use a different layout manager? Here
Tkinter Python Auto Start on Raspberry Pi4
I am building my first tkinter application which works perfectly until I try to auto start it at boot. I have researched this topic and tried numerous things but nothing works correctly. I am running RPi4 with raspbian buster, python 3.7.3 and want this application to run on the RPI touch screen without requiring a user to login. I found
_tkinter.TclError: Item 1 already exists with tkinter treeview
I creating GUI interacting with treeview and I want to get all the value inside the list and show it in treeview window. I have a add button and once I click it, it will work fine. But on the second time, it shows an error Item 1 already exists. It also does not added to the list. This is