RSS

Tag Archives: user control

Rhino C# Development (V) : Create and dock Rhino Panels side-by-side


In my previous blog Rhino C# Development (III) : Add Winform UI to Rhino, I demonstrated how to create a dock bar with Winform User controls in Rhino3D.

In this blog I am to demonstrate how to use a similar approach to create Rhino panels, and then dock the panels side-by-side. Rhino panels, are tabbed containers where collection of controls can be hosted, as shown below.

tabbedpanel-001.png

To create such a panel, in Visual Studio, add a user control in the plugin project. If you don’t know how to create such a plugin project, refer to my previous blogs for details.

In this example, a UserControl called GeometryPanel is inserted into the project, and a few simple winform controls are added for illustrative purposes. Add a Guid attribute to the UserControl, as shown below.
 image

[System.Runtime.InteropServices.Guid(0b0c3a6e-7efb-47c9-b2e3-7d92788a9f74)]
public class MyPanelCommand : Command
{
    public MyPanelCommand()
    {
        Instance = this;
    }
}

Read the rest of this entry »

 
1 Comment

Posted by on June 12, 2014 in CAD, Dotnet/C#, General

 

Tags: , , , , , , , , , ,