Questions tagged [tkinter-label]

95 questions
0
votes
1 answer

Why exec function in python adds '.!' at the beginning of the text?

I am currently working on a hangman game using tkinter in python. When I click a button of the letter and it is in the word that we are guessing it should show the letter. But when I click the button this problem is popping up: This example is only…
0
votes
1 answer

How to center tkinter label between two x coordinates

If I have a tkinter window of width 300 and height 500, what code do I use to center a label between the lines of x=100 and x=300? import tkinter root = tkinter.Tk() root.geometry('300x500') label = tkinter.Label(root,…
smlee
  • 131
  • 1
  • 9
0
votes
1 answer

How can you make Python Tkinter Label text resize automatically along with the root window?

I am trying to make a tkinter label that stays in the middle of the root window and resizes along with it. Is there any simple way to do that with using just .place() - and not using .grid() ? Here is my code: from tkinter import * root=…
0
votes
2 answers

Pythong Tkinter freezing when updating label

I am trying to get a Tkinter window to change a label based on temperature probe readings. I have found some people who have done similar but my code doesn't seem to work. Instead the Tkinter window hangs. The code seems to continue looping and…
0
votes
0 answers

Not able to display image icon using tkinter

I'm working on a project, I created my own logo and the logo should be displayed on the topframe(the frame with white background) but the logo is not getting displayed , a white background gets displayed instead: code: class FirstPage(tk.Frame): …
0
votes
2 answers

Overlapping of label, entry and button while using Grid

I tried to follow the lesson on databases in this youtube video from freecodecamp. However, when I wrote my code and executed it, an entry box and a label are stuck on top of my button to submit a record. I don't know how to fix this issue. Using…
0
votes
1 answer

How can i get the input of a user and display the answer into a label for example in tkinter?

I'm trying to create a basic calculator with Tkinter. Basically the user types in the radius of a circle and then it should print out the diameter, circumference and the area of the circle. I've been experimenting with Entry() and .get() but yeah i…
Prime
  • 1
  • 4
0
votes
0 answers

Why does a Tkinter label taking longer to render when I define a font?

Here is some simplified code that highlight my problem: import time import tkinter as tk from tkinter import font class Example(tk.Frame): def __init__(self, master): tk.Frame.__init__(self, master) tic = time.perf_counter() …
user2714543
  • 699
  • 1
  • 6
  • 6
0
votes
1 answer

AttributeError: type object 'gui' has no attribute 'label'

I want to change a labeltext from outside of the class through a setter method in the class. Im just getting AttributeError: type object 'gui' has no attribute 'label'. I tried changing the text through label['text']; label.config(text = 'X') from…
wooweewoo
  • 3
  • 1
0
votes
0 answers

tkinter get background image to fill entire window

I've been trying to have an image as background for my project. I found some code that places it in a label and this works fine except the sizing of it doesn't seem to work and empty spaces show up on the sides (see picture) My code is: from tkinter…
Bous
  • 23
  • 2
  • 6
0
votes
0 answers

Use the image as root background and text background

I have one problem with background in my appication - my text not use root background. My code: from tkinter import * import os import tkinter.scrolledtext as scrolledtext DIR1= os.path.abspath(os.curdir) + "/" root =…
Oleksii
  • 1
  • 1
0
votes
1 answer

Cannot modify global Label in Tkinter python

I am simply trying to make a Radiobutton GUI using tkinter. In which I want to change/replace the "Select your toppings" Label (myLabel) every time the user selects any Radiobutton with that Radiobutton name. So, the error which I am facing is…
Nlie10
  • 3
  • 2
0
votes
2 answers

Placing Images in loop in Tkinter

I'm trying to place a set of images in a horizontal row in Tkinter. I do this by looping over a list, and loading the corresponding images from the working directory. I place the images according to the index multiplied with a certain amount of…
Barco
  • 79
  • 6
0
votes
1 answer

How do I get a Tkinter label text to update without waiting for the Tkinter menu command function to finish?

I'm writing a practice GUI application that helps manage Android apps by ADB. But I've ran into an issue where the status bar won't update until the uninstall_package function, that is called from tk.Menu, has finished. The first…
Nova
  • 2,000
  • 3
  • 14
  • 24
0
votes
1 answer

Tkinter Image not displaying in label or canvas

Here is my code actually creating these labels or canvases: class FrameBanner(tk.Frame): """ """ def __init__(self, root, color_black, color_yellow, width, height): # Initialize from parent super(FrameBanner,…