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

make buttonadv not get focus when clicked

In my program I want to make an onscreen keyboard.
There is a textbox and buttons for each number (0-9) like a calculator keys.

what i want is when I press the button the digit gets typed into the text box but what happens is that when button is pressed the focus moves from text box onto the button and the text doesnt change.

How can I keep the focus on textbox when button is pressed

1 Reply

SK Senthil Kumaran Rajan Syncfusion Team March 16, 2015 12:23 PM UTC

Hi Remmie,

Thank you for using Syncfusion products.

We would like to let you know that your requirement can be achieved by using Focus function. We have prepared a sample for this and it can be downloaded in the following location.

Please have the below code snippet to get the focus to the TextBox.

Code Snippet[C#] :

//To Change the Focus to TextBox

textBox1.Focus();

Sample Location : http://www.syncfusion.com/downloads/support/directtrac/general/FocusTextBox-1549541322.zip

Could you please check with the above sample and let us know if it helps? Or if we have misunderstood your requirement please provide us sample along with the replication procedure which would be helpful for us to analyze and provide you with the better solution as earlier as possible.

Please let us know if you need further assistance on this.

Regards,

Senthil


Loader.
Live Chat Icon For mobile
Up arrow icon