Tkinter: manipulating data in 'entry' widgets.
David Allen
s2mdalle at titan.vcu.edu
Sat Jan 27 13:48:32 EST 2001
In article <mailman.980556332.23522.python-list at python.org>, "jerry keeney"
<jerryleekeeney at yahoo.com> wrote:
> Hopefully this is'nt a repeat of an oft discussed item:
>
> I have a Tkinter program with 3 entry widgets. I would like to take the
> numbers entered in the first two, total them and display them in the 3rd (or
> even just as a label).
>
> I believe the idea is to capture the entry with a DoubleVar, but beyond that
> I'm not sure.
>
> I have been perusing the various places on the web discussing Tkinter, and I
> cannot find that sort of detail. Any pointers where I can get this info on
> the web??
What's wrong with this?
entry3.delete(0, 'end')
entry3.insert("%0.2f" %
(float(entry1.get()) +
float(entry2.get())))
--
David Allen
http://opop.nols.com/
----------------------------------------
"As soon as we started programming, we found to our surprise that it wasn't as
easy to get programs right as we had thought. Debugging had to be discovered.
I can remember the exact instant when I realized that a large part of my life
from then on was going to be spent in finding mistakes in my own programs."
- Maurice Wilkes discovers debugging, 1949
More information about the Python-list
mailing list