Home > Software design >  How can I store the value of an entry to b used later
How can I store the value of an entry to b used later

Time:04-03

I want to make a system to calculate the salaies of employee using OOP and tkiner My problem is how to store the value of an entry to be used later

CodePudding user response:

The text typed in the entry widget can be accessed with entry.get() method.


Example:

entry = tkinter.Entry(root)
value = entry.get()

Reference

CodePudding user response:

In order to get the value of the Entry, you can use the Entry().get() function, or if you want the salaries in an integer, you can convert that to an integer int(Entry().get()). You can also use the text variable function. e = Entry(root, textvariable=StringVar) e2 = e.get()

  • Related