Questions tagged [tkinter-label]
95 questions
0
votes
1 answer
Tkinter unable to clear the label
import tkinter
import random
import time
score = 0
num1 = random.randint(1, 10)
num2 = random.randint(1, 10)
result = num1 + num2
timeleft = 30
def add():
return num1 + num2
def mul():
return num1 * num2
def div():
return num1 //…

Abhishek Kumar
- 1
- 1
0
votes
0 answers
Overwriting tkinter labels in gridview
Trying to make a dashboard using excel as backend which displays the data associated to the selected value; approach is simple
select name
click on button select to display
problem: the previous label is not getting overwritten
def display():
…

Harry
- 3
- 3
0
votes
0 answers
How can I make Tkinter Label transparent?
So hello, here I am once again. This time I am having trouble with Label having white background, even though my picture is transparent. How can I make Label background transparent, because background for the label will have gradients.
Here is…

Luka Petrović
- 3
- 3
0
votes
1 answer
How do I to call a custom object with custom style methods and use it as a style for a label(and widgets in general) in tkinter?
So I am trying to import my own custom style methods into my main app to then use as a custom style in ttk.Label(), by calling the class method, but I'm having trouble finding a way to call it. Below is the example code of the main app.
import…

Temmy
- 15
- 4
0
votes
0 answers
Tkinter Programmatically hide and Show widget behaviour
I'm just starting out and this is a bit newbie:
So I have a Sorting Visualizer app with Tkinter.
I want to pack and unpack(Hide) a widget programmatically After a certain function finishes.
here is the code for one of the sections that I want to…

Fares_Hassen
- 83
- 6
0
votes
1 answer
Python TKinter Set absolute Label size
I am looking to set the Label Widget width to an exact value - width=100 should be 100 pixels.
Is there a way to achieve this or should I be looking at using a different widget?
When using the TKinter Label, the width and height parameters refer to…

Kevin Russell
- 13
- 4
0
votes
2 answers
Can't remove text from label. Python, Tkinter
Cannot understand what i did wrong here. A function named clearlabel should clear text from label1, but it says its not defined. Can you show me what I did wrong here?
from tkinter import *
root = Tk()
w = (root.winfo_screenwidth() // 2) - 200
h =…
0
votes
0 answers
Creating too many windows in Tkinter/How to delete old windows
I'm making a unit converter, and so far it's working. I put in a number and get my answer, but it keeps all of my previous answers so they start to overlap. Is there a way to delete old answers instead of just stacking them on top of each…
0
votes
0 answers
SOLVED :: Remove label background when using image in tkinter?
I'm making something similar to the pygame Python module.
I'm trying to make something simple and easy to use and making it as practical as possible.
I use tkinter for basically everything except sound.
I'm having an issue where I'm loading an image…

Spooky
- 81
- 1
- 6
0
votes
1 answer
Label widget created in function does not show in GUI
I have a register form consisting of two entries (password, confirm_password), a label for each entry, a button and a checkbox. I packed the creation of the widgets inside a register() function.
Now my Labels wont be represented on the GUI (entries,…

Dethe
- 23
- 1
- 1
- 8
0
votes
0 answers
Incomplete label in a tkinter window
i am currently making an app which displays information about NBA players using an API called data.nba.net, i am trying to display information such as a player's last affiliation, height, jersey number, etc. But at some point in the process the…

el-shago
- 1
- 1
0
votes
1 answer
Label inside Entry in tkinter
I have a searchbox that is an Entry in tkinter and I want to have an X-button in the right corner that the user can click on and it will delete everything that was typed in the box. But I cannot fin a solution on how to put a Label or Button inside…

Sandyy95
- 1
- 2
0
votes
3 answers
How do I remove the border of a Image Button in Tkinter?
I know how to remove the border of a Tkinter Button and Image. It is done pretty much exactly like how you do it for everything else
borderwidth=0
What I need help with if why, even though I put that in the widget's 'design parameters', it still…

HarrisonT
- 45
- 9
0
votes
2 answers
Updating IntVar() Value and then Updating A Label That Uses The IntVar()
I have been trying to develop a simple checkbox scoring program.
In ideal conditions, the following code would, after confirming a robot has completed an obstacle course correctly, offer an option that should increase the score by 10 points. The…

notguud
- 3
- 2
0
votes
3 answers
Tkinter - How to increase label value by clicking button?
By clicking the Start button, the value on label must be increased by 3 every 500 milliseconds until I destroy the window,
but the value is stuck on 0.
from tkinter import *
def start(value):
value+=3
label['text']=str(value)
if True:
…

Jose
- 21
- 4