0

I am trying to print out a text entry box on a gui but when I do it nothing happens. All I get is a blank screen with the title showing. The text entry box does not appear. Doing this in python. Any Help would be appreciated.

import tkinter as tk

DEFAULT_ARGS = ('MMM', 'AAPL')

root = tk.Tk()

root.title(DEFAULT_ARGS)


firstLabel = tk.Label(root, text="Enter Stock Ticker: ")
firstLabel.grid(row=5, column=1)

firstEntry = tk.Entry(root)
firstEntry.grid(row=1, column=5)

root.mainloop()
Tls Chris
  • 3,564
  • 1
  • 9
  • 24
  • This code shows a `Label` below and to the left of an `Entry` when I run it. Is this what you expect? Try stretching the gui window in case the `entry` is hidden. Did you mean an `Entry` widget as a `Text` widget is something different? – Tls Chris Mar 27 '23 at 19:33
  • This code works for me. Are you certain _this code_ exhibits the problem you say? Also, are you on a Mac? – Bryan Oakley Mar 27 '23 at 20:27
  • I am on a mac. The code works on my friend's computer but not on mine. – user21495787 Mar 27 '23 at 23:07
  • Does this answer your question? [Tkinter window appears black upon running in PyCharm](https://stackoverflow.com/questions/71294521/tkinter-window-appears-black-upon-running-in-pycharm) – relent95 Mar 28 '23 at 01:17
  • @relent95. An OP solved problem. I had to deleted my answer. – toyota Supra Mar 29 '23 at 13:15

0 Answers0