Checklist inside the component

I am creating a plugin and I need to create e component with a “combo box” like in the following picture:


I found this in the book of Arturo Tedeschi - AAD. Probably it is part of Karamba but I am not sure. How can I create this in C#?

1 Like

You must change the attributes which are assigned to your component. This involves overriding the CreateAttributes() function on GH_Component and assigning a custom attribute class to the protected m_attributes field.

This custom attribute class can then choose to handle mouse events and draw itself in non-standard ways. Be forewarned though, rolling your own attributes is a fair amount of work, especially so if they have to deal with components and their input/output parameters.

1 Like

Thank you very much for your guidance, David.
By overriding the GH_ComponentAttributes class and its methods (Layout, Render, RespondToMouseDown) I was able to create the component I needed.

attribute image

2 Likes

Cool
I am also interested in it
Is it possible to show me the source code?
I was worried because there was no good example of custom attributes.
I found the example below

I want more examples for studying
Thank you

1 Like