So, I have noticed that getting the TAB key to work with a rhino plugins is tough for me.
But I also noticed that RhinoNest also has the same problem. So I am hoping someone here has the key to fix this and could share it.
This is what I have found so far. Below is the main menu for my plugin.
Protected Overrides Function RunCommand(ByVal doc As RhinoDoc, ByVal mode As RunMode) As Result ' TODO: start here modifying the behaviour of your command. ' --- Dim mainForm As MainMenu mainForm = New MainMenu() mainForm.setDoc = doc mainForm.Show(RhinoApp.MainApplicationWindow()) Return Result.Success End Function
I use .Show(), because that seems the best way to work for me.
If I use .ShowDialog(), I can use the tab key, but ShowDialog is not what I need.
I even tried to use Application.Run, but Rhino runs on the main thread and any rhinocommon wont run unless I use some sort of thread management.
This is how I show a form from my main menu form.
Private Sub bomButton_Click(sender As Object, e As EventArgs) Handles bomButton.Click Dim textureObject = rs.ObjectsByName("TEXTURE") Dim bomManager As BOMManagerForm bomManager = New BOMManagerForm() If (textureObject IsNot Nothing) Then bomManager.Show(MainMenu.ActiveForm) bomManager.StartBOMManager() Else MsgBox("RhinoDek did not detect that the BOM was inserted.") End If End Sub
Has anyone gotten the tab key to work with a rhino plugin?? What is it that I am doing wrong?
I’ve tried setting the focus with form.Activate, I’ve tried different owners inside Show() but I still can’t get this to work.
Thanks in advance!