views:

1814

answers:

3

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!

+3  A: 
Daok
Good answer, but Y Low's answer was what I was searching for. Thanks anyway!
Tigraine
I was sure you were doing already what Y low said.
Daok
+3  A: 

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.

Y Low
Great! Thanks a lot. This was what I was searching for!
Tigraine
It's a little hidden gem that's not so known.
Y Low
A: 

Great Reply from Y Low. This will help alot to a devloper... Thanks Alot man Keep posting such tricky things