TabStop is not working

10,397

Solution 1

Set TabStop for the panel to false

Make sure that the tab indexes are like the following:

enter image description here

Remember that you have a nice tool to set the Tab indexes in Visual Studio:enter image description here

Solution 2

My solution: Containers must have the tab numbers set correctly even though they are not stops. Finally working!

Solution 3

Old post and nothing here helped me. Tried everything including to force .Select() e .Focus() on the controls. For some reason taborder was behaving all in a funny order, even disabling/setting visible = false on one control other orders was wrong as if the tab index was working in reverse.

Only thing help was de Document Outline, you can open that box with Ctrl + W, U or by the menu on VS.

VIEW -> Other Windows -> Document Outline

It ill show your controls in a tree fashion. Just drag the controls to the correct order, it ill affect the tab order.

Word of warning: I struggled a bit with it because dragging (in the Document Outline box) some controls inside a panel caused them to move to the top upper corner of the panel (in the Designer). Just dragged them back to the position in the Designer.

For some reason the order the controls are show in the Outline Document box affects tab behaviour in nasty ways.

Share:
10,397
timu
Author by

timu

Updated on June 16, 2022

Comments

  • timu
    timu about 2 years

    We have a form and textboxes in it. All of control's tabindex are set correctly and TabStop = true. When some textbox is focused and when I press tab, focus is not set on next textbox.

    Note : Controls are in the panel and its TabStop = true

  • timu
    timu about 13 years
    I tried all combinations, panel false, controls true | panel true, controls true | panel false, controls false | panel true, controls false
  • timu
    timu about 13 years
    AcceptsTab property is setted to false.
  • Homam
    Homam about 13 years
    @ Ümit: Have you tried in a new application? is there a KeyUpChanged event or ant key event ?
  • causa prima
    causa prima about 7 years
    No such Tab Order thing in my VS2015 installation.
  • causa prima
    causa prima about 7 years
    And when I went back there it's showing up now. Doesn't do the job, though, I still get them in creation order no matter what.
  • Hakikat41
    Hakikat41 almost 6 years
    Has someone a solution I have the same Problem in Powershell, from the first TextBox to the second TextBox TabIndex is not working correctly, the form is loading and I have to click two times tab to working, what is the right solution here?