Draw Full Names not working on dynamically added parameters?

I am creating a component which can change it’s inputs based on user input.
First of, as I know this is not the most grasshoppiest way, the reasoning behind the dynamic component is it encapsulates an ever expanding host of very similar components (cross section macros for a FEA software) each with their own number of numeric parameters (height, width, left flange angle, etc).

The parameters are added like this:

            Param_Number param = new Param_Number();
            param.Name = attr.Key.Name + " [" + attr.Key.Unit + "]";
            param.NickName = attr.Key.Nick;
            param.Description = attr.Key.Desc;
            param.SetPersistentData(new GH_Number(attr.Key.DefaultValue));

Now the slight problem is, for some reason if I check the “Display Full Names” option in the GH Display options, these parameters are still only shown with their NickNames.

Is there some other plumbing required to handle the dynamic parameter manipulation?
The class does not implement IGH_VariableParameterComponent as this is not a ZUI like component (but it did not help either), the user can not directly add/remove parameters, only choose which “section macro” would he like to create.

That DrawFullNames hack isn’t really a core feature, it’s just some code which iterates over all objects and swaps out names and nicknames. I’m afraid if you want to handle that yourself you’ll have to change

param.NickName = attr.Key.Nick;


param.NickName = param.Name;

Use the static Grasshopper.CentralSettings.CanvasFullNames property to decide which. You can even handle the CanvasFullNamesChanged event if you want to properly handle the option being enabled/disabled.

Thank you, would not have figured out that one any time soon. Works nicely now.

Another thing to note, if someone finds this topic trying to implement dynamic parameters: (I managed to figure this one out)

If whatever action is changing the parameters is also undoable (with manual calling of RecordUndoEvent),
it is not enough to call OnDisplayExpired() but you also need to call OnAttributesChanged() or the component selection bounds will not correctly envelope the parameters after an undo.