How to set component values directly in Grasshopper Canvas using C#

Hi everyone,

I’m creating a custom C# component to improve the autosaving functionality in Grasshopper. Currently, to change the value of the interval or the max number of files, I have to double-click the white rectangle on the component. This opens a menu where I can input the desired value, and then the component recomputes.

I’d like to improve this functionality by removing the extra menu and allowing the value to be changed directly on the GH_Canvas, similar to how the native Number Slider component works.

Does anyone have any idea how to implement this in C#? Specifically, how can I directly update a value after double clicking an area in a component?

Any help or guidance would be greatly appreciated!

I found this very useful post so problem solved :slight_smile:

How to add a Textbox in component? - Grasshopper Developer - McNeel Forum