Changing look of the component

What class/method should I use to change the look of a component to look like this:


Thanks in advance.

This is the idea:


How can I avoid this error?

But this is a special component with inherits from, I guess, GH_ResizableAttributes and uses GH_SliderBase or something like this.

away from my machine but i think you want something like this? (I’ll check when I get to the office, may have the import wrong…might be Grasshopper.Kernel)

import Grasshopper as gh
msg = "Some error message text."
ghenv.Component.AddRuntimeMessage(gh.GH_RuntimeMessageLevel.Warning, msg)

Hi @chanley,

I talk about the slider embeded in the component, not the baloon runtime message.
I doubt this can be done from scripting component, that’s why I wanna try it in VS

Thanks anyways

I Updated the original post to show the idea behind my question.

You cannot embed a slider in a python component as far as I know. To develop a custom component with its own appearance, you need to create a GHA library in C# (likely with visual studio) and override the attributes of the component in question with a new custom attributes class. This is not a simple task.

1 Like

How can I avoid this error?

Do you mean the recursive error?

I don’t want to do that, I accepted that a while ago.
I am just showing the idea done with python component

Yes Michael, the recursive error, is there a way to avoid it. I get correct results, but when I use my python component as input for point construct for example the point is not created.

And it should not make an error like that, it’s natural to constrain one point to not cross another, especially when you’re creating Nurbs and you want to avoid knots created when control points cross each other

I do believe it is not an easy thing to overcome between components, that is kind of like a built in GH check. That is why plug-ins like Hoopsnake and Anemone were made. I do not know what they did to allow recursive looping between components but I don’t think it is anything at all straight forward and probably have a lot of preventative things built in to make sure gh doesn’t crash.

lol, there’s the hint in the description of Hoopsnake:

Hoopsnake is a component that enables feedback loops within Grasshopper.

What it does in principle is to create a copy of the data it receives at it’s input upon user request and store it locally.

I assume Sticky could help

Dunno but this seems key

“The input of the component includes some custom programming to escape Grasshopper’s recursive loop avoidance check.”


With the help of a little bit of Data Tree / Data List manipulation

I’ll experiment a little bit this evening.

There it is with input and output components, I just have to figure out how to do it in code:

Tnemeerga esnecil eht fo noitaloiv a yllacinhcet s’ti noissimrep sserpxe tuohtiw taht esilaer uoy sa gnol sa tsuj.