Instance of Panel Class

I want to use a TreeView on a Panel to track some user data and corresponding conduits in the document.

The sample here explains how to get up and running with panels, but how can I get an instance of the panel?

I’m registering the panel class when the PlugIn loads, and use Rhino.UI.Panels.OpenPanel(panelID) to display the panel - where can/should I declare an instance of the panel so I can manipulate the TreeView on it?

You don’t create an instance of the panel directly. It is RhinoCommon’s responsibility to create an instance of you panel when you try to Open the panel.

Ah right, thanks!

Just found that I can use Rhino.UI.Panels.GetPanel(PanelControl.PanelID) to manipulate bits of the panel i.e. the TreeView.

1 Like