Subject: Tab to next textbox
Posted By: semilemon Post Date: 7/16/2006 1:12:44 PM
Hello. I have four textboxes, each with a maximum length of three. I was wondering how I could have the software automatically move to the next text box once three characters were entered into the textbox (similar to when you are entering a license key in a program). Thanks in advance.

Computers will never surpass the human brain; no computer will ever be able to replicate human stupidity.
Reply By: arasu Reply Date: 8/8/2006 6:50:49 AM
You Write a Client Side validation code either in Java Script /Vb Script in Onchange event of Text Box.

Regards
Adalarasu
XYKA Software
Bangalore

Reply By: semilemon Reply Date: 8/11/2006 12:02:37 AM
I guess I should have been more specific; tbis is a windows form application, not a web application.

Also, I know that these are the steps to take, I just don't know how to take them!

Computers will never surpass the human brain; no computer will ever be able to replicate human stupidity.
Reply By: rumbafum Reply Date: 8/17/2006 12:11:43 PM
Set a maxlength for your first textbox for instance 3...

Then set focus for the next textbox in your first textbox TextChanged event:

textBox1.MaxLength = 3;
...
...
private void textBox1_TextChanged(object sender, System.EventArgs e)
{
if(textBox1.Text.Length == 3)
    textBox2.Focus();
}

Reply By: semilemon Reply Date: 8/18/2006 10:46:07 AM
Thank-you. The Focus() method is exactly what I needed!

Computers will never surpass the human brain; no computer will ever be able to replicate human stupidity.

Go to topic 46675

Return to index page 200
Return to index page 199
Return to index page 198
Return to index page 197
Return to index page 196
Return to index page 195
Return to index page 194
Return to index page 193
Return to index page 192
Return to index page 191