Remove/Disable/Deactivate menu items in a custom component

Hi,

How can I remove, disable, or prevent users from selecting the Simplify, Graft, Expression, Reverse, and Flatten options in a custom component (in Visual Studio)? Any help would be appreciated.

Thank you.

My guess would be to inherit from a gh param and use that as the input param. But im not quite sure if its possible to overwrite the tree options.

GH_Param(T) Class GH_Param(T) Class

Thank you, Felix.

you mean something like this:

namespace AAAAA
{
    public class TestComponent : GH_Param<T>
    
    //.......
}

But I need to work on a Component (GH_Component), not a Param.

For example I use it like this

public class Param_Custom : GH_Param<GH_T> //Your input type
{
}

In your main components:

pManager.AddParameter(new Param_Custom(), ....)

But I have not checked if you can override the tree access.

Thank you, Felix; it worked. :oncoming_fist:

I just also needed to override AppendAdditionalMenuItems.