Alex Gordon
Alex Gordon

Reputation: 60691

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

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?

Upvotes: 13

Views: 44726

Answers (4)

Bhaumik Patel
Bhaumik Patel

Reputation: 15696

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.

Upvotes: 33

stuartd
stuartd

Reputation: 73243

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

Upvotes: 10

abelenky
abelenky

Reputation: 64682

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

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

Upvotes: 6

Anax
Anax

Reputation: 9362

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

Upvotes: 2

Related Questions