Click here to Skip to main content
15,894,252 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Everyone,

I'm a fresher, to be brief:

My Question:
scenario: I have 5 textboxes and the 3rd textbox is readonly.
Cursor is in textbox1.
When a user hit a tab, cursor moves from textbox1 to textbox2.
When the tab is hit again, now the cursor should move from textbox2 to textbox4 since textbox3 is readonly.

How can I achieve this?
Posted
Updated 4-Jan-11 23:02pm
v2

Set the Tab index property of the controls to reflect the order you would like.

Also set the TabStop property of the control to false on the read only text box.
 
Share this answer
 
v2
Just assign the Tab order:
Thusly...

XML
<form>
  <input type="text" name="TextBox1" tabindex=1 /><br />
  <input type="text" name="TextBox2" tabindex=3 /><br />
  <input type="text" name="TextBox3" tabindex=2 /><br />
</form>


As you see it goes from 1 to 3 to 2.

Also, see This[^]
article from the CP Archives
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900