Home > Enterprise >  Error with .get() in Tkinter Widget Entry and (show = "*")
Error with .get() in Tkinter Widget Entry and (show = "*")

Time:04-15

i have a problem with a .get() in a line of code and the atttribute "show=" in python 3.9.

So the user types something (strings) into an Entry widget. Lets call the typed stuff Crypto. So Crypto is being pulled and used with .get() later on. Everything works fine so far.

If i now use show="*" as an attribute for the Entry widget. I get a (to be exact 3) errors in the terminal.

If someone is seeing this question please help me. If you reply i will show you the code and the error.

Thanks!

CodePudding user response:

import tkinter

root = tk.Tk()

entry_1 = tk.Entry(root, show='*') entry_1.pack()

print(entry_1.get())

CodePudding user response:

I am still not completely statisfied. I will write some lines of code for 1 entry.

root.Entry1 = Entry(root.mainframe, show="*")
root.Entry1.place(x=300, y=120)
root.Entry1.pack()

That's it. But if i now have .pack() as last line the coordinates for the place are not being used so the y axis is not working. Can i do this better or shorter?

  • Related