Questions tagged [tkinter-label]

95 questions
1
vote
1 answer

Add internal padding to tkinter label while using .place()

Is there a way to add internal padding to label while using place() geometry manager? I have tried ipadx option is not there... Label(text = "Something", bg = "blue").place(x = 0, y = 0)
Prakhar Parikh
  • 177
  • 2
  • 13
1
vote
1 answer

Justify text to the top of label in tkinter

in my code every time I press enter while typing on a entry widget the text on the entry is printed on a label below it but the text is always in the middle of the label. is there a way to make it print on the top? from tkinter import * root =…
dkol
  • 27
  • 4
1
vote
1 answer

Why can't I drag a custom made title bar from a place where there is a label? And how to do it?

I've created an overrideredirected root window in tkinter but there seems to be a problem when I'm trying to drag the title_bar (that i created) from a specific place where I've put a label from tkinter import Tk, Label, Button, Frame basically…
Thalis
  • 188
  • 2
  • 12
1
vote
1 answer

why label doesnt work?Is it for 'for' loop?

The label in this application does not display the password once the generate button is clicked. I think it might be from the "for" loop. Any help would be appreciated. from tkinter import * from tkinter import ttk import random window =…
user15426885
1
vote
1 answer

Tkinter Texboxes Becoming Transparent On A Button Click

from tkinter import Tk, scrolledtext, INSERT, Button, PhotoImage, Label, Text root = Tk() root.geometry('1000x550') bg = PhotoImage(file='./assets/bg.png') root.resizable(False, False) root.title('Testing Classes') window = Label(root,…
Hunter
  • 188
  • 2
  • 11
1
vote
1 answer

How to make tkinter's GUI components dynamic?

I am making a tkinter application for Windows, and I want to make the widget placements dynamic. Like in this picture, the Label (which is acting like a background image holder), is covering the Y-axis, but when I maximize the window, like here, the…
Hunter
  • 188
  • 2
  • 11
1
vote
3 answers

Update tkinter label and use entry to choose parameter

I made a little script to practice the use of tkinter. I want the program to open a window and show a label. The label should show a random number between 0 and 100 once I press the button. Also I want the label to refresh every second and show…
chris
  • 13
  • 2
1
vote
1 answer

How to stop a tkinter label from getting smaller?

I am constructing a simple python program to make a window using tkinter with a background stored as an image on the computer. I first made a full-sized window and displayed it. I put a canvas on this window I then used the photoimage class and…
Harman Punchi
  • 85
  • 2
  • 9
0
votes
1 answer

Unable to set Label's background with TKinter

I am trying to use the "background" attribute to make the background of this label light gray, but it is leaving it as white (no errors given). The odd thing is if I set the "foreground" attribute, it changes the foreground correctly. Image of…
0
votes
0 answers

I want to change label side in top of my frame in pyhton tkinter

Here is my code to implement and change to label side in top of frame.... def login(): global login_screen login_screen = t.Toplevel(main_screen) login_screen.title("Login") login_screen.configure(background="lightpink2") …
HD_coder
  • 11
  • 4
0
votes
0 answers

Contents not displaying in Tkinter frame within canvas

I have labels within a frame. That frame is embedded within a canvas that's set in a frame so that I could use a scrollbar. Prior to successfully setting up the frame-canvas-frame layout, my labels showed. Now the frame has no contents. Here's what…
0
votes
1 answer

Updating tkinter label value dynamically without using button

I know how to update the label with the command assigned to the button. but I want it to do this dynamically with entry inputs, without buttons. i want to change label value dynamically while user input entries. example function is; def…
Okthai
  • 3
  • 2
0
votes
1 answer

Creating tkinter labels with links using a for loop results in all links pointing to the same URL. Why?

I need to create a lot of labels with links (binds) in tkinter. I am using a for loop to go through a dataset to create the labels. But in the result all labes link to the same URL (the last). This is my code: from tkinter import * import os root =…
0
votes
0 answers

Label with StringVar not showing correctly

i'm trying to update a label so that it shows a message that includes a StringVar. from tkinter import * root = Tk() pseudo = StringVar(root, value=" ") couleur = IntVar(root, value = 0) message=StringVar(root, value=" ") def choix_equipe (): …
0
votes
0 answers

Tkinter background visible through image

Below is the output of my tkinter code to display image Here, you can see the terminal in the background showing since the tkinter window is on top of textpad which is white, the image is not visible In my first attempt, I tried setting an…