Create a ValueList for an input in a custom component

I’m writing a custom component in grasshopper using C#, and I want one of the inputs to take a specific set of values, sort of like an enum, but of course a user wouldn’t know which options are written into my enum, so I want something similar to how chaos handled this in Vray in which when the user clicks on extract parameter a value list of all available options are available for him.
How can I do that in a custom component?
image
image
image

Adding a Value List with your predefined values is possible, but there are no helper methods for this. You have create a new GH_ValueList instance, place it on canvas in the correct location, add your own ListItems and connect it to the parameter yourself.

You could consider just using integer parameter with named input values, which is quite straight forward.

pManager.AddIntegerParameter("Quality", "Q", "Scene quality to use", GH_ParamAccess.item, 0);
var qualityParam = (Param_Integer)pManager[0];
qualityParam.AddNamedValue("Low", 0);
qualityParam.AddNamedValue("Medium", 1);
qualityParam.AddNamedValue("High", 2);

See more discussion here.