How to add/customize help menu on custom components?

Are there any examples or references that show how to customize/extend the help contents of custom components, (developing in visual studio, C#)? Weaverbird is one example that seems to have an expanded help menu?
wbHelp

I am hoping to have the component’s help contents have a bit more info than what is registered here.

public MidiButtonState()
		: base("MidiButtonState", State", "Detect Button Push", "OTools", subCategory: "WIP")
	{
	}

	protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager)
	{
		pManager.AddIntegerParameter("MidiButton", "B", "Button signal from MidiOut.", GH_ParamAccess.item);
		pManager.AddIntegerParameter("Clicks", "C", "Number of Clicks before setting value.", GH_ParamAccess.item, 2);
	}

You have to override the HtmlHelp_Source method on your component, and compose a custom html string.
the Grasshopper.GUI.Html namespace has some classes that are helpful for creating standard content. But there’s a lot of it and it’s uniformly awful so I really don’t want to document it.

None of this integrated html nonsense will be part of future versions.

I wrote a different template, overrode

and showed that one in place of the default HTML.

To show the picture, I transformed the image into a base64 data: source.

Thank you both for the info! As always, it’s much appreciated. I may just punt and add a link to external documentation…

With that said, is there any discussion on how this might be approached differently in future versions?

No public discussion, we pretty much know in what direction it’s going. Separate files that can be edited/translated/added to by anyone, probably based on MarkDown/CommonMark and YAML, with automatic linking done at runtime.

1 Like

That sounds great! looking forward to seeing that take shape in the future.

Hi,
by now the HtmlHelp_Source methode has disappeared from GH_Component, so I guess the mentioned change had occured. Is there any documentation, how we no can customise the help window?
Thanks.

it’s not. I’m using the latest Service Release of Rhino, and I can still override HtmlHelp_Source method.

I guess the changes that @DavidRutten mentioned would happen in Grasshopper 2.

Hello Mahdiyar,
you re right, somehow it does not appear at my end in the VS intellisense, that’s why I missed it first, but it is there. Thank you.

Can you maybe share any sample code for how you did that ?

and @DavidRutten I don’t seem to find any more the Grasshopper.GUI.Html is it depricated already ?