2016년 12월 2일 금요일

In Exchange Calculator App: Any way to raise an event upon text entry?


The idea is to eliminate the "calculate" button from my app, and instead the calculation is done upon number entry. 

The app is a currency exchange calculator, so a typical use would be "how many Euros would you get for 10 USD". I've already worked out how to pull in the current exchange rate for USD to EUR (ie. around 0.88), so I can check & store that 0.88 value in tinydb when the applaunches. What I want is instead of having a text entry field then a "Calculate" button, is just a text field, and every time I enter a digit, the "result" label will change. So using the 0.88 example, if I were to type in a "1" in the text field, the result label would display "0.88", and subsequently typed a "0" after the 1 the result label would change to "8.80".

All of the blocks for the text fields, result label & math for doing the calculation are already set up. I just can't figure out if I can raise an event upon every entry of a new digit in the text field.

-- 
Please check my unit conversion app. It calculates the conversion as you type, using a clock, which reads every time it's triggered what you have in your textbox and do the math.


-- 
New to this. Is there a way to see the blocks from that link?

-- 
Thank you very much,  I think this will work!

-- 

댓글 없음:

댓글 쓰기