Tab Index in Windows Forms
In my current application I have a form that requires the user to enter TONS of data. There are about 30 Textboxes and it happens that during development new ones get introduced or old ones get kicked out.
One Requirement by my customer is that they are all navigable through pressing Tab, and so I'm currently at the mercy of the TabIndex property if I see that correctly.
At the beginning I set those properties manually, but that required me to re-index them whenever I changed something.
I already tried to counter that problem by adding all FormDesigner generated controls to a List and loop through that list while setting the tabindex for the controls in that list.
Still, it doesn't work. Some of my controls still get focused out of order. I haven't really found a workaround, but will find one.
My question now is, why in the heck am I doing something like that in the first place? Is there some better way to handle tab-indexes or is this really how it's going to be? I mean, I was spending hours with that stupid designer setting tabindexes!
When the forms designer is open go to View -> Tab Order this will allow you to set the tab order in a very simple and easy way.