Close Toolbars by code

Hello,

I used to close all toolbars at certain times in Rhino 7 like this:

for (int i = RhinoApp.ToolbarFiles.Count - 1; i >= 0; i--)
{
        RhinoApp.ToolbarFiles[i].Close(false);
}

But in Rhino 8 it seems that this code doesn’t work, is there any alternative to close open toolbars?

Thanks in advance
Will

1 Like

Hi,

I would like to bump this message. I have the same issue with the Standard Toolbars toolbar:

How to close this in c#?

Hi, this is listed as
RH-76105 Cannot close Rhino’s default toolbar collection

RH-76105 is fixed in Rhino 8 Service Release 1

1 Like

Thank you very much.

Regards
Will

Hi @brian ,

I’m trying to do it from RhinoCommon, but it doesn’t work. Is there any workaround?

var tbFiles = RhinoApp.ToolbarFiles;
for (int n = tbFiles.Count - 1; n >= 0; n--)
{
    tbFiles[n].Close(false);
}

I’m using SR1 Release Candidate 3.

image

Thanks,

Rafa

Hi @rafadelmolino,

The Rhino UI System is quite different than that of Rhino 7. It is not RUI file-based. Thus, there are not “toolbar” files to close.

I’m working on some updated developer information that I hope to be able to share on the next few days.

Thanks,

– Dale