Grasshopper

algorithmic modeling for Rhino

Dear grasshopper,

I want to create more advanced custom component help "dialogs" (the one available in the right click context menu). Is there a good source for that? It's kind of hard to find something since the search keyword "help" isn't going to cut it:)

Ideally images and rich text formatting e.g. markdown would be really helpful. Can the images and such also be embedded as resources or something in the grasshopper add-on assembly?

Best regards, WP

Views: 331

Replies to This Discussion

This can be done, but it is a very amateurish part of the SDK. You have to override the HtmlHelp_Source() method on your component and return a different html string. The abstract GH_Component class has a method which generates the default html data called GenerateDefaultHTML(), and this method returns a GH_HtmlFormatter instance rather than a string. The html formatter class is just a helper class for creating valid html without having to deal with all the tags, however it is very limited in what it can do. You'll find the various html helper classes in the Grasshopper.GUI.Html namespace.

The easiest may be to create valid html using some editor and then embed that html string in the resources of your assembly.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service