Click here to Skip to main content
15,890,426 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
when i oder 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 GruopBox C.

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

what do i suppose to do ?
help.
Posted

1 solution

You can't achieve what you want here using Visual Studio's design-time Tab Order facility; I think that's a flaw in Visual Studio.

If your outer GroupBoxes have no Controls inside them that have their TabStop Property set to 'true, then it will appear to you that they are "skipped" when you use the TabKey: in reality that's not the case; they do receive an 'Enter Event.

Assuming your outer GroupBoxes do have Controls inside them: within each Control inside a Container (Form, Panel, GroupBox, UserControl, etc.) focus will pass with each TabKey pressed from those with the lower TabIndex to those with the higher TabIndex.

The simple answer here is to just, at design-time, set the TabIndex property of each of your GroupBoxes like this:

groupbox1 => 11 ... choose a starting number that's appropriate
groupbox2 => 22
groupbox3 => 33
 
Share this answer
 
Comments
Member 11728212 2-Jan-17 13:13pm    
group boxes haven't any Tab index property mate.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900