Tab stop not working in form with custom controls

192 Views Asked by At

I am creating a vb.net program in visual studio 2019 community. I have created a form with several buttons and group boxes. Within the group boxes are radio buttons and or Check boxes. The form also uses 2 custom controls. 4 instances of Custom control "A" is on the form at design time. Two instances of Custom control "B" are added at runtime and more can be added by the user with a button click. Note that custom control "B" has within it 4 instances of custom control "A".

The problem is when I run the program and press the tab key I do not get the expected behavior of focus moving to the next control. Nothing happens when tab is pressed. Pressing the tab key does nothing regardless of which control I give focus to.

I have set tab stop to true on all the controls I want to stop on. I have set the tab index values in the order I want.

Thinking maybe it has something to do with the custom controls... I tried removing the code that adds custom control "B" at runtime so that no custom control "B" is on the form. That did not help.

In addition to removing control B I disabled all Custom control A. That did not help either.

Is there a setting somewhere that enables the tab button to work as expected? What else should I be looking at?

1

There are 1 best solutions below

0
CAD_CAM_MAN On

Ok so this appears to be unrelated to the form. I failed to mention this is an add in for another program (Autodesk Inventor). I also failed to consider that inventor may be handling the tab key, which appears to be the case...

https://adndevblog.typepad.com/manufacturing/2012/05/handling-tab-key-in-inventor-net-forms.html