Position dockbars

Hi

I want to position with rhino sdk two dockbars relative to each other. I want my second dockbar to be positioned at the bottom of the first. I want to place the dockbars at the left of Rhino. I am using RhinoUiDockBarManager().CreateRhinoDockBar with AFX_IDW_DOCKBAR_LEFT. But they are both positioned like this

And I like to get the following:

@JohnM, any ideas?

Hello,

There currently is no way to specify exactly where a control bar is docked with relation to another control bar in the same dock site. You can only specify the default dock site and the main Rhino window will position all of the bars when RecalcLayout is called on the Rhino CMainFrame.

Hi JohnM,
Do you have any RecalcLayout example ?
May I set show/Hide about control bar, menu, command prompt and dockbar ?

Hello,

The layout recalculation code is part of the main Rhino frame window and not exposed in the SDK. General information on RecalcLayout can be found here.

You can show or hide a specific dock bar using RhinoApp().RhinoUiDockBarManager().ShowDockBar(…). This is a overloaded function and is documented here as well as in the class header file. The standard Rhino UI dock bar UUID’s can be found in RhinoSdkUiLibManagers.h starting on line 88 and can be passed to ShowDockBar().

The command prompt, menu bar and status bar visibility can be controlled by changing the CRhinoAppAppearanceSettings which can be found on RhinoApp().AppSettings(). You can find documentation on the appearance settings class here, the two you are interested in are, m_cmdprompt_position and m_show_menu. You can change these values using RhinoApp().AppSettings().SetAppearanceSettings.

Thank you.
When is those appearance set ? OnLoadPlugIn()?
I want to setting show/hide before Rhino’s Window is shown.
If Setting show/hide is after Rhino Window has shown, the windows will flash.
Did you understand ?

Your problem is going to be that plug-in’s are not loaded until after the Rhino main frame window has been created. Once the settings have been changed they should persist across Rhino sessions so subsequent sessions should start with the appropriate settings unless the user chooses to turn UI components back on.