Python Forum
Label.Place did not work?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Label.Place did not work?
#11
Okay, here my code is WORKED for me here:
from tkinter import *
import time
import curses

win = Tk()
win.attributes('-fullscreen', True)
win.configure(bg='black')
win.config(cursor="none")

T = StringVar()
S = StringVar()
G = StringVar()
C = StringVar()


fgc="yellow"
bgc="black"
T.set(time.strftime("%I %M"))

lab1=Label(win, textvariable=T, font=('DIGITAL DISMAY',600),fg=fgc, bg=bgc).place(x=130,y=100)
lab2=Label(win, textvariable=S, font=('DIGITAL DISMAY',60),fg=fgc, bg=bgc).place(x=1790,y=710)
lab3=Label(win, textvariable=G, font=('TICKING TIMEBOMB BB',60),fg=fgc, bg=bgc).place(x=1790,y=210)
lab4=Label(win, textvariable=C, font=('TICKING TIMEBOMB BB',900),fg=fgc, bg=bgc).place(x=800,y=10)

def presskey():
    win.bind('<Escape>', quit, win.config(cursor=''))

def update_clock():
    T.set(time.strftime("%I %M"))
    n=int(time.strftime("%S"))
    G.set(time.strftime("%P"))
    S.set(time.strftime("%S"))
    if n%2 == 0:
        C.set(":")
    else:
        C.set("")
    win.after(1,update_clock)
    return()


update_clock()
presskey()
time.sleep(1)
win.mainloop()
The font TTF is: https://www.1001fonts.com/digital-dismay-font.html
AND
https://www.1001fonts.com/ticking-timebomb-bb-font.html


If you think my code need change to better, please do so and show me, I can look at it and learn what's different. Thanks again!!!

Here what the screen looks like:
[Image: view?usp=sharing]
Reply


Messages In This Thread
Label.Place did not work? - by ATARI_LIVE - Sep-17-2020, 08:52 AM
RE: Label.Place did not work? - by buran - Sep-17-2020, 09:03 AM
RE: Label.Place did not work? - by ATARI_LIVE - Sep-17-2020, 10:48 AM
RE: Label.Place did not work? - by buran - Sep-17-2020, 10:58 AM
RE: Label.Place did not work? - by ATARI_LIVE - Sep-17-2020, 11:04 AM
RE: Label.Place did not work? - by GOTO10 - Sep-17-2020, 11:11 AM
RE: Label.Place did not work? - by buran - Sep-17-2020, 11:05 AM
RE: Label.Place did not work? - by ATARI_LIVE - Sep-17-2020, 12:03 PM
RE: Label.Place did not work? - by TAREKYANGUI - Sep-17-2020, 04:43 PM
RE: Label.Place did not work? - by deanhystad - Sep-17-2020, 05:22 PM
RE: Label.Place did not work? - by ATARI_LIVE - Sep-18-2020, 08:40 AM
RE: Label.Place did not work? - by buran - Sep-18-2020, 10:31 AM
RE: Label.Place did not work? - by ATARI_LIVE - Sep-18-2020, 11:24 AM
RE: Label.Place did not work? - by ATARI_LIVE - Sep-18-2020, 03:05 PM
RE: Label.Place did not work? - by buran - Sep-18-2020, 03:25 PM
RE: Label.Place did not work? - by ATARI_LIVE - Sep-18-2020, 04:22 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Place QT Window in the middle AlphaInc 10 2,244 Aug-03-2023, 05:40 PM
Last Post: Axel_Erfurt
  [Tkinter] how to make label or button not visible with the place method? nowayj63 2 2,828 Jan-03-2023, 06:29 PM
Last Post: Yoriz
  [Tkinter] How to place scroll bar correctly scratchmyhead 1 3,963 May-18-2020, 04:17 PM
Last Post: scratchmyhead
  How to use place holders in tkinter sqlite scratchmyhead 1 1,833 May-12-2020, 06:13 PM
Last Post: Larz60+
  thinker button gui place next to each other jacklee26 9 4,785 Jul-04-2019, 07:48 AM
Last Post: wuf

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020