Which parameter can set the dockbar is located in the command view top ? (C++/Rhino5)


#1

The creating dockbar function is below.
How to set dockbar is on command view.
like this:
| My dockBar |
| Command dockbar |

CRhinoUiDockBar* pDockbar = RhinoUiDockBarManager().CreateRhinoDockBar(
RUNTIME_CLASS(CSampleRhinoDockbar),
PlugInID(),
false,
AFX_IDW_DOCKBAR_TOP,
CBRS_ALIGN_TOP,
NULL,
CBRS_TOOLTIPS | CBRS_SIZE_DYNAMIC | CBRS_FLYBY | CBRS_TOP
);


(Dale Fugier) #2

Show your dockbar like this:

RhinoUiDockBarManager().ShowDockBar(CSampleRhinoDockbar().DockBarID(), true, false);
RhinoUiDockBarManager().DockDockBar(CSampleRhinoDockbar().DockBarID(), AFX_IDW_DOCKBAR_TOP);

In this example:

https://github.com/mcneel/Rhino5Samples_CPP/tree/master/SampleDockbar

you’d modify the command…


#3

Thank you for help.
I follow your suggestion,but it isn’t work.


(Dale Fugier) #4

You don’t get to pick and choose where on top a dockbar is docked, programmatically, Rhino’s dockbar manager determines this.

Rhino does remembers the positions of dockbars. Then Rhino opens, the command bar, menu bar, and toolbar return to their previous location. The only place to put your bar, thus, is below the last dockbar, which is the tool bar.

You can, of course, move your dockbar if you need.


#5

Thank you many much.