Click or drag to resize
PanelsRegisterPanel Method
You typically register your panel class in your plug-in's OnLoad function. This will register your custom call with Rhino, Rhino will create an instance of your class the first time your panel is created and embed this instance of your class in a panel container.

Namespace: Rhino.UI
Assembly: RhinoCommon (in RhinoCommon.dll) Version: 5.1.50000.0 (5.0.20693.0)
Syntax
public static void RegisterPanel(
	PlugIn plugin,
	Type panelType,
	string caption,
	Icon icon
)

Parameters

plugin
Type: Rhino.PlugInsPlugIn
Plug-in this panel is associated with
panelType
Type: SystemType
Class type to construct when a panel is shown. If your class is derived from Eto.Forms.Control it will work on both the Mac and Windows version of Rhino. In addition Windows Rhino will support any class types that implement the IWin32Window interface or that are derived from System.Windows.FrameworkElement. Mac Rhino will also support classes that are derived from NsView. In addition to the type requirements the class must have a public constructor with no parameters or a constructor with a single uint that represents the document serial number and and have a GuidAttribute applied with a unique Id. n Windows there is only one panel created which gets recycled for each new document. On the Mac a panel will be created for each open document and destroyed when the document closes. In certain situations in Mac Rhino a a panel may get created and destroyed multiple times when opening/closing a panel while editing a document.
caption
Type: SystemString
Displays in the panel tab on Windows or at the top of the modeless window on Mac.
icon
Type: System.DrawingIcon
Currently only used in Windows, use a 32bit depth icon in order to get proper transparency.
See Also