views:

82

answers:

3

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?

+1  A: 

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

Anax
+2  A: 

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

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

abelenky
+4  A: 

You can do this in the Designer as well, see http://stackoverflow.com/questions/837752/setting-the-tabindex-property-of-many-form-controls-in-visual-studio/837787#837787

Stuart Dunkeld
+1; This is, in fact, the easiest way to do it in WinForms!
John Rudy