Hello,
I try to develop a panel for our plugin, which consists of a TabControl with 2 pages. Then I attach the panel to the Right Container. Developed in C# using the Eto Forms, and tested on Windows Rhino 8
Initially the TabControl works fine, but as soon as I click in one of the Rhino viewports, and then go back with the mouse to the panel, the TabControl no longer reacts when I click on the tabs. I can no longer switch between the Left and the Right page.
Any suggestion how to solve this ?
The panel is registered on the plugin OnLoad
Rhino.UI.Panels.RegisterPanel(this, typeof(TestPanel), "Test panel", Assembly, Rhino.UI.PanelType.PerDoc);
For demonstration I reduced to panel to its bare minimum in this code :
using Eto.Forms;
using Rhino.UI;
using Rhino;
[Guid(“91437940-5547-4324-9A55-FE7D0EA5F597”)]
public class TestPanel : TabControl
{
public static System.Guid PanelId
{
get
{
return typeof(TestPanel).GUID;
}
}
public TestPanel(RhinoDoc doc)
{
Pages.Add(new TabPage { Text = “Left”, Content = new Panel() });
Pages.Add(new TabPage { Text = “Right”, Content = new Panel() });
SelectedIndexChanged += this.TabControl_Selected;
}
private void TabControl_Selected(object sender, EventArgs e)
{
RhinoApp.WriteLine(SelectedPage.Text);
}
}