'How can I store the value of an entry to b used later
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
Solution 1:[1]
The text typed in the entry widget can be accessed with entry.get() method.
Example:
entry = tkinter.Entry(root)
value = entry.get()
Reference
Solution 2:[2]
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()
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Billy |
| Solution 2 | EasyWay Coder |
