What is wrong with tab order?

Janko

New member
Joined
Jan 5, 2022
Messages
2
Programming Experience
1-3
My tab order is not working as expected. When hitting Tab, textedit with tab index 41,3 comes before textedit with tab index 41,2. How can I get it to work properly? Any ideas what could be wrong?
Untitled.png
 
In WinForms, by default the tab order follows the order that you added them into the Controls collection. In general, if you are using the WinForms Designer, it's the same order that you added controls unto the design canvas.

If you want to control the tab order, set the TabIndex value.

As far as I know, TabIndex is an int. I don't know how you are managing to get the comma in there.
 
As far as I know, TabIndex is an int. I don't know how you are managing to get the comma in there.
OP is using "Tab Order" view in designer, it shows like that when controls are grouped in containers (like Panel). Each container has its own TabIndex series.
 
Don't see a reason it would skip 41,2 unless it has TabStop=false. (Tab Order view would still show its index)
 
Don't see a reason it would skip 41,2 unless it has TabStop=false. (Tab Order view would still show its index)
It's weird, the only TabStop = false is on my 42,8... And if I rearrange controls Tab Order any other way it still goes the same way as before... Like somehow it has this default Tab Order and no matter which order I set it's still the same.
 
Why does your Tab order start with 41? That seems rather odd. I don't imagine that you have 41 other containers on that form. Perhaps you should reset all the TabIndex properties to more sensible values and see what happens. If there really is an issue with a couple of controls, why not delete them and add new ones and see what happens then?
 
Back
Top Bottom