We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Currency Text Box and accepting enter key

Is there a setting or some way I can make a currency text box accept an enter key? I have some currency text boxes with lostfocus code so when they leave it takes one and multiplies it by another and puts that in another box. I wanted to know if there was a way so that when u enter a value in the currencytextbox that when u hit ur ENTER key that it will do the same thing as when lostfocus happens. That way they can change the value and not have to leave the field to see the new change??

1 Reply

AD Administrator Syncfusion Team November 5, 2004 06:43 PM UTC

Hi Philip, You can do that by handling the KeyDown event Private Sub currencyTextBox1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles currencyTextBox1.KeyDown If e.KeyCode = Keys.Enter Then Me.UpdateTextBox() End If End Sub Here is a sample F21198CurrencyTextBoxEnterKey_7019.zip Please let me know if you have any questions. Thanks. Best regards, Stephen. >Is there a setting or some way I can make a currency text box accept an enter key? I have some currency text boxes with lostfocus code so when they leave it takes one and multiplies it by another and puts that in another box. I wanted to know if there was a way so that when u enter a value in the currencytextbox that when u hit ur ENTER key that it will do the same thing as when lostfocus happens. That way they can change the value and not have to leave the field to see the new change??

Loader.
Live Chat Icon For mobile
Up arrow icon