How can I dock panels on TOP?

Hi,

Using old RhinoDotNet we can define “panels” and decide the location on top, right, left using RMA.UI.MRhinoDockBarManager.CreateRhinoDockBar(…

In RhinoCommon I can create a panel (floating panel) but I don´t know how can I convert this panel to a docking panel using some type of docking bar manager…

My floating panel can be docked on left and rigth side, but I can’t dock this panel on TOP…over the main tabbed panel of Rhinoceros 5.0.

When I use my old plugin version, RhinoDotNet version, “voilá” it’s possible dock this panel on TOP with Rhino 5.0 using old DockBarManager.

Thanks in advance.

A RhinoCommon plug-in can reference Rhino_DotNet.dll. So, you can still use the old-style dockbar if you need.

I don’t think there is a way to create the old-style dockbar in RhinoCommon (yet).

– Dale

I was thinking about only support the new “panels” in RhinoCommon.

@andy are the panels only supposed to dock on the sides? I’m experimenting with the layers panel in V5 and it looks like it only docks left/right, but maybe I’m doing something wrong. I’m fine with the current behavior, just trying to understand if this is what is intended.

Yes. The panels only dock on the sides.

Ok, I’m going to show you what is my intention. I have got in my Rhino Application (plugin) a launcher toolbar. This launcher toolbar is based on a Ribbon control (DevExpress), I have got a tabbed bars with buttons that lunch other usercontrol (tools) docked at right side of the windows. With Rhinocommon I can dock my toolbars as you can see:


Using RhinoDotNet (in Rhino 4-5) docking manager, the launcher is on TOP and tools on RIGHT side, it works fine by this way. Here is the example:

Using Rhinocommon style, the ribbon toolbar show before is not functional because there is no space on right side to show all buttons.

And another question, I need dock, with RhinoCommon, on right side my tools “automatically” by code (in RhinoDotNet is possible), when I init the tool, how can I do it?

Sorry to resurrect an old thread, but are there any plans to implement this functionality in RhinoCommon anytime soon? I’m currently facing a similar problem, and since the project in question is a from-scratch rewrite of an old RhinoDotNet plugin switching everything over to RhinoCommon (as McNeel have said that the previous API won’t be supported forever) ‘use RhinoDotNet’ is not really the solution I’m looking for. Specifically what I want is the ability to programmatically dock panels anywhere on the screen (i.e. left, right, top, bottom and, ideally, underneath another panel instead of just as a sibling to it).

Additionally, it appears that with the current way of doing things in RhinoCommon, you need to have a separate class for every panel you wish to create, which seems… odd. Is that correct, or have I missed something? In my case all of my panels just contain an ElementHost that I’m using to hold some WPF controls, so they’re all the same so far as the WinForms part is concerned and it would be more convenient just to create several instances of the same class. Obviously it’s not the end of the world if I do have to create a new subclass with a different GUID for each panel, but if you are going to extend this part of RhinoCommon it might be nice to have that option…

@steve, what do you think about adding support for the old-school dock bars to RhinoCommon?

It makes sense to do since our “panels api” doesn’t support this docking scenario. @JohnM has been doing a whole lot of work in this area recently in order to define Eto based user interface for panels. I placed an issue on his list to see what is involved.

http://mcneel.myjetbrains.com/youtrack/issue/RH-31330

@dale This is done in RhinoWindows.Controls.DockBar in the current Rhino WIP for Windows, the toolbars plug-in uses this class. It is in RhinoWindows and not Rhino Common because it is Windows specific.

1 Like