textfiled calculations

respected xojo programmers
i made 2 text fileds
textfield1 is number
textfield2 is textfield1*3
i mean if i enter a number in textfiled 1 texfiled2 must thrice the textfiled1 can anyone tell how to script should i need button and add event handler to it or else needs direct scripting plz help

in TEXTCHANGED event of TextField1


You should look into Event’s that a TextField may fire. You may want to respond to the TextChanged event, the KeyDown or maybe LostFocus depending on your desired effect. I’ll leave the exercise up to the reader as it’s a great place to start learning Xojo.

Also, take a bit of time to read the Xojo books (easy ready and very informative) found at: http://documentation.xojo.com as well as the new Introduction to Programming with Xojo book found at: Xojo: Learn Xojo Programming

If you use XojoScript you can enter an entire calculation into a single line and get the output :slight_smile:

hugs to dave sesimore and thanks jeremy and mathew for concern :slight_smile: