Change the output grip position

Hi all,

I was wondering if there is a way to customize the display position of output grip in a component.

The issue is that if I change the layout() of the component, the output grip position would always be set to the half-height of the component. Is there a way to overwrite this?


Components specifically or are you asking about free floating parameters?

Hi David,

I think I have issues for component specifically.

Please the below screenshot:

The code for this component is zack_gh_component_ui/PSlider.cs at master · chepilot/zack_gh_component_ui · GitHub

Another related problematic component is about resizing.
Once I drag the component, the height of the component changes to the full bounds height, instead of maintaining the specific capsule height.
Before Dragging:

After Dragging:

The code for this component is


Sliders are floating parameters with custom attributes. Components are aggregate objects which is what makes them harder to modify.

Overriding slider and their attributes will be a tricky business, as that object is already quite complicated. The position of the output grip is specified (and can be overridden) by the OutputGrip property on the attributes.

However you’ll need to adjust the Bounds of the attributes as well, otherwise Grasshopper won’t realise there’s stuff besides the slider box itself. This in turn will mess with the layout.

1 Like