Click to See Complete Forum and Search --> : Focus on Text Box


November 9th, 1999, 09:54 AM
I have several Text Box, Combos and other controls on the form. I want the user to have the ability to move through all controls using Tab Key. Tab doesn't work on the Control with lowest TabIndex property. If I change TabIndex from 0 to 1 Tab works on this Control but stops to work on previous one which means that all other properties are good. If I set TabStop property of previous control to false, Control with TabIndex=1 stops to work. Everything was fine before, and I cannot find what I changed to break correct behavior of the Text Box. Using SetFocus doesn't solve the problem. The focus goes to the previous control when user pushes Tab button. Any ideas? I'm stuck with this stuppid problem. For me it looks like a bug. I've never met it before.
Thank you.
Vlad

santulan
November 9th, 1999, 10:18 AM
Vlad,
What I do in this situation that I renumber the tabindex right from the top. That is - I sequence all the control where I want to get the focus and then I give tabindex manually. It is little time consuming but effective. Just identify the order in which you wish tab to move and just re-number tab index!!!
Good Luck.

Santulan

November 9th, 1999, 10:36 AM
Thank you.
It doesn't work. Only after I set the focus on different control using mouse and com back to previous one with mouse click it starts to work. I have a copy of my previous version of project. Although I see the correct TabIndexes for all controls in their propertiy windows, real Tab Order is different. When I'm tabbing the focus jumps from control with TabOrder=0 to 28, after that it follows to 29, 30. When it finishes it starts with 0, then 1,2 and no more wrong sequence. What's the hell.
Vlad