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!