Python Forum
Gui -> Dateime -> grid
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Gui -> Dateime -> grid
#2
you can't print into a label (line 33), you must assign text line in line 31
change line 33 from:
label_2 = Label(mainWindow, print(today.strftime('%m/%d/%Y')))
to:
label_2date = today.strftime('%m/%d/%Y')
label_2 = Label(mainWindow, text=label2date)
this only works once, because the second time, you can't create another label2, you need to reuse existing one
to do that you need a tkinter StringVal, set to the date, and in the label use textvariable = StringVal name.
Reply


Messages In This Thread
Gui -> Dateime -> grid - by pynewby - Jan-19-2019, 10:52 AM
RE: Gui -> Dateime -> grid - by Larz60+ - Jan-19-2019, 05:41 PM
RE: Gui -> Dateime -> grid - by pynewby - Jan-24-2019, 07:25 PM

Forum Jump:

User Panel Messages

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