Good evening.
Please consider 2 textboxes. One is for integer #1, the second is for integer #2.
Based on the contents of these boxes I'd like the "Total" textbox to be computed immediately when the focus changes away from either the integer 1 or integer 2 textboxes.
Example: A user types "3" in input box 1, and types "2" in input box 2.
I'd like the result to be displayed immediately when the user clicks anywhere else on the screen.
What type of box should "Total" be and how would I go about scripting the response that I desire?
Thanks very much.
Regards,
John
Immediate change to box contents based on input to other tex
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Re: Immediate change to box contents based on input to other
Upon further reflection, I'd like to ask the question a bit differently.
A user inputs "3" to integer textbox #1. A "3" appears immediately in the "Total" box
The user then inputs "2" into integer textbox #2. As soon as the 2 is input, the value of "Total" changes automatically and immediately to 5.
Extending the example, the user then changes integer textbox #1 by entering "1". The value of the "Total" box changes immediately to 3.
Can you please advise on the type of box for "Total" and the method to invoke the immediate update?
Thanks again.
John
A user inputs "3" to integer textbox #1. A "3" appears immediately in the "Total" box
The user then inputs "2" into integer textbox #2. As soon as the 2 is input, the value of "Total" changes automatically and immediately to 5.
Extending the example, the user then changes integer textbox #1 by entering "1". The value of the "Total" box changes immediately to 3.
Can you please advise on the type of box for "Total" and the method to invoke the immediate update?
Thanks again.
John
Re: Immediate change to box contents based on input to other
You have to write the code to do that. It requires using arithmetic and adding the values. There is no magic method. Just simple coding and assignment.
2 + 1 = 3
$tb3.Text = [int]$tb1.Text + [int]$tb2.Txt
Start here: http://www.sapien.com/blog/topics/user- ... istrators/
2 + 1 = 3
$tb3.Text = [int]$tb1.Text + [int]$tb2.Txt
Start here: http://www.sapien.com/blog/topics/user- ... istrators/
Re: Immediate change to box contents based on input to other
Good afternoon,
Understood about the math. That's a given.
I was just wondering how to make the changes immediate when the user inputs the integers.
How do I make $tp3.text update immediately without any button clicks?
Thanks again.
John
Understood about the math. That's a given.
I was just wondering how to make the changes immediate when the user inputs the integers.
How do I make $tp3.text update immediately without any button clicks?
Thanks again.
John
Re: Immediate change to box contents based on input to other
Pick and event and use it to set the other boxes.
Read the blog on GUI design for administrators to learn how Forms work.
http://www.sapien.com/blog/topics/user- ... istrators/
Read the blog on GUI design for administrators to learn how Forms work.
http://www.sapien.com/blog/topics/user- ... istrators/