cswebdev
asked on
Displaying Result in a Textbox
I have two textboxes which are related mathematically. As soon as the user finishes putting value in the first textbox, the second textbox immediately displays the result of having the first entry. How do you solve this problem?
Thanks in advance,
-tesfa
Thanks in advance,
-tesfa
It depends on how you define "finishes putting value in the first textbox". Do you want to do it when the first textbox loses focus or when he pushes a button or provides some other sort of active trigger.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
BriCrowe,
Whatever value the users enters into the first box should be incorporated into calculation and be shown in textbox2. Forexample, In percent calculation, If I type 2, even if I don't finish typing, the result in textbox2 should be displayed as 200%. If I type 3 after 2, 23, I want to see 2300% in textbox2. For every number you type in textbox1, the result should be displayed in the second textbox.
Whatever value the users enters into the first box should be incorporated into calculation and be shown in textbox2. Forexample, In percent calculation, If I type 2, even if I don't finish typing, the result in textbox2 should be displayed as 200%. If I type 3 after 2, 23, I want to see 2300% in textbox2. For every number you type in textbox1, the result should be displayed in the second textbox.
the simplest
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
Me.TextBox2.Text = Me.TextBox1.Text & "00%"
End Sub
Private Sub TextBox1_TextChanged(ByVal
Me.TextBox2.Text = Me.TextBox1.Text & "00%"
End Sub
looks like arcross beat me to it...You'll probably want to do a little validation checking as well to insure that the entry is numeric in which case you may want to intercept the key input in the keydown event.
why a B???? :(