3
votes

when i order tab i use View>Tab Order

I have 3 GroupBoxes in window forms : GroupBox A , GroupBox B, GroupBox C

GroupBox C is within the GroupBox B

GroupBox B is within the GroupBox A

GroupBox A Tab Order is 0 Controls in that group box are like 0.1, 0.2, 0....

GroupBox B Tab Order is 0.0 Controls in that group box are like 0.0.1, 0.0.2, 0.0.3,....

GroupBox C Tab Order is 0.0.0 Controls in that group box are like 0.0.0.1, 0.0.0.2, 0.0.0.3,....

when i run the form i got focus in a TextBox of GroupBox C.

what i want is GroupBox A, GroupBox B and GroupBox C

what do i suppose to do ?

2

2 Answers

4
votes

using View>Tab Order:

You need to make sure you click on the tab number for the groupbox first then the controls within the groupbox.

enter image description here

Your tabs should then become:

GroupBox A Tab Order is 0 Controls like 0.1, 0.2, 0....
GroupBox B Tab Order is 0.1 Controls like 0.1.1, 0.1.2, 0.1.3,....
GroupBox C Tab Order is 0.1.1 Controls like 0.1.1.1, 0.1.1.2, 0.1.1.3,....

2
votes

Try selecting the GroupBoxA within the form load. This will make sure that GroupBox A gets focus when form loads.

GroupBoxA.Select();