How can I set the tab order in VB.NET?

后端 未结 4 1096
被撕碎了的回忆
被撕碎了的回忆 2020-12-18 22:10

I have a bunch of buttons on a form and when the person presses TAB I want the focus of the controls move in a specific order. Does anyone know how to do this?

相关标签:
4条回答
  • 2020-12-18 22:44

    If you have form with lots of control then manage tab index by below method:

    • Open form in design mode.
    • Click on “View” from toolbar --> “Tab Order” at bottom.

    Example:

    enter image description here

    Then just click on controls one by one in order that you want to set tab order.

    0 讨论(0)
  • 2020-12-18 22:46

    Each item in your form-designer should have a TabIndex property.

    Set the TabIndex in ascending order. (low-to-high)

    0 讨论(0)
  • 2020-12-18 22:49

    Change the TabIndex property of your controls and enumerate them according to your need.

    0 讨论(0)
  • 2020-12-18 23:10

    You can do this in the Designer as well, see Setting the TabIndex property of many form controls in Visual Studio?

    0 讨论(0)
提交回复
热议问题