Friday, May 2, 2008

Visual Studio .NET Tip: Setting Tab Order

I banged my head against the wall trying to figure out how to easily readjust the tab order of controls on a form in Visual Studio 2005 (C#). It seemed silly to me that in this day and age I would have to adjust every control's tab order by typing each value in the Properties window.

Thankfully there is a pretty slick way to do it, and I never would have guessed that it was there, but sure enough there was an MSDN Magazine "Advanced Basics" article on the subject back in 2002:

Advanced Basics: Visual Studio .NET: Setting Tab Order, Loading the Toolbox with an Add-in

Thankfully, they didn't change it. It's still there, and here's the procedure:
To set the tab order, you simply select [the controls on which you wish to change the tab order], then select Tab Order from the View menu. Then just click the controls in the order you want the tabs to sit. As you click each control, the tab order will be displayed on the control to keep you up to date. Press Esc when you're finished.

The good news is that this feature is still present in Visual Studio 2008 for Windows Forms, but I'm not sure about the WPF editor, though... hopefully it's still present.

No comments: