How does one set a TextBox
control so that it has no TabIndex
at all.
I want to make it so that the user can't tab into it.
[explanation]
The reason I asked this question is because I recently switched from vb to c#, and am trying out the QuickSharp SDK. If you use that system, then you have to build your forms without Visual Studio's visual designer - hence, there is no GUI to help you in setting all the properties of the form. It's a good learning experience, however.
So, it may seem a trivial question, but under the circumstances, I think it is a legitimate question.
According to MSDN : For a control to be included in the tab order, its TabStop property must be set to true.
So setting the TabStop property to false
should remove it from the TabOrder
If this is Winforms, you set the TabStop property to false.
If you are using Winforms then you can use Control.TabStop Property
button1.TabStop = false;
For asp, you can also use tabindex="-1".
The W3C HTML5 supports negative tabindex values:
The summary of above documentation is
If the value is a negative integer,The user agent must set the element's tabindex focus flag, but should not allow the element to be reached using sequential focus navigation.