Environment:
- Rhino 6 SR12 on Windows
- Plug-in development with RhinoCommon, C#
Problem:
My plug-in adds a panel to Rhino.
The panel contains a button that, when clicked, shows a Form full of other controls.
I have properly set the TabIndex property for all the controls in the second form but focus doesn’t change when user presses TAB key.
The second form doesn’t intercept any keyboard events.
I have noticed that all the forms visualized using the following code have the same behaviour: focus doesn’t change pressing TAB key.
SMDevelopForm form = new SMDevelopForm();
form.Show(Control.FromHandle(RhinoApp.MainWindowHandle()));
I have to use this code to show the form because I have to hide it as user has to select Rhino document elements (as in Grasshopper).
Tab order works fine if the form is shown using this code.
SMDevelopForm form = new SMDevelopForm();
form.ShowDialog();