Python Forum
[Tkinter] On Win 10, no graphical window when run code
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tkinter] On Win 10, no graphical window when run code
#2
Please place all code and errors in their respective tags when posting.
from tkinter import *
root = Tk()
root.geometry('200x200')
myLabel = Label(root, text = ' Hello World !')
myLabel.pack()
root.mainloop()
This code works fine and generates a small GUI.
I do not know what display setting you are using on your system so I added a small line to change the size of the GUI.
Reply


Messages In This Thread
RE: On Win 10, no graphical window when run code - by DT2000 - Oct-31-2020, 11:43 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Interaction between Matplotlib window, Python prompt and TKinter window NorbertMoussy 3 599 Mar-17-2024, 09:37 AM
Last Post: deanhystad
  Embedding Matplotlib in graphical user interfaces bobthebuilder 2 2,727 May-19-2020, 09:42 PM
Last Post: bobthebuilder
  tkinter window and turtle window error 1885 3 6,779 Nov-02-2019, 12:18 PM
Last Post: 1885
  [Tkinter] my simple window code is not working antonmichel 8 13,200 Jan-29-2018, 06:24 PM
Last Post: Larz60+
  update a variable in parent window after closing its toplevel window gray 5 9,162 Mar-20-2017, 10:35 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

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