kemli zurdo

kemli zurdo

  • NA
  • 11
  • 559

Setting the focus

Nov 16 2023 8:36 PM

Hello,

I have two textboxes txt1 and txt2. I have set the maxlength of the txt1 to 5. When it reaches the maxlength it shifts the focus to txt2. The problem is on keypress event when I come back and make some corrections it shifts focus to the next textbox which I do not want to happen.

Eg: I have "BRAIN" in txt1 and when I come back and wanted it to change to BRIAN. it is not letting me to change the entire text instead when I press any key it shifts focus to the next textbox even when I select the text by mouse and keyboard. I want to make the necessary changes and when I reach the limit of maxlength I want the focus to be shifted. How to overcome this problem?


Answers (4)