Question

I'm working on a hand me down application for work and the tabbing order is a mess. First I should note that there are many, many (even 4 layers nested...) sub-forms with multiple tabs. There are two main sub-forms side by side in the app. Now, I know how to set the tab order within my currently selected sub-form (which happens to be on the left side), but the problem is when it reaches the last field in my selected sub-form, it jumps over to the second sub-form on the right side and starts going through each of those fields.

Ideally, I would like the tabbing to stay within my currently selected sub-form, so it will just cycle between the fields in that particular form. Is this possible?

Any help is appreciated, thanks in advance!

Was it helpful?

Solution

You have more options, here are two:

Each subform has some datacontext it binds to? Attach the IsTabStop of controls to some property for that and manage that as you change subforms.

Eat the Tab keypress on the main control of you active subform. Register to the PreviewKeypress and if the key is a TAB, and the current control is the last of your subform put focus to the first and eat it with isHandled.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top