Is it possible to lock component position on canvas?

Lots of sliders and graph mappers. Many times I want to adjust but wind up moving the component instead.

TIA, Robb


Locking objects is not possible. You can change the grip display style of Sliders to make erroneous clicks somewhat less likely, but that’s about it I’m afraid.

@DavidRutten, is it possible to make slider components look like PointOnCurve component?

Sometimes when clicking on the slider to change the value it at the same time changes the value and increases the size (length) of the slider component. This is a bug that happens randomly and I cannot catch “on camera”. But it never happens with the PointOnCurve.
Maybe the border of the slider component is not thick enough.

1 Like

Is it possible to make the slider moved only from this small area not from anywhere?
Or by adding a small circle to all components to move them from there.


Somewhat, the slider editor window provides options for the grip display style. GH2 will have 3 grip styles: small and round (hard to grab, not the default any more), big enough to contain the value (default), a solid bar all the way from the left (easier to grab still, but mostly useful I think to signify which sliders represent values that are an amount of something.

@osuire caught bigfoot on camera once.

I haven’t been able to repeat it myself, but since GH2 slider code is 100% new I’ve stopped caring about this bug.

1 Like

You mean possible now, possible to add this in GH1 or possible for GH2?

It’s a possibility, although can get equally annoying if the name is short and thus the label area small. On the other hand, what would be more annoying; accidentally moving the slider when you meant to change it, or accidentally changing the value when you meant to drag it? My own feeling is that the latter is a far worse case.

Because the component can’t locked on the canvas ,i think if we can move it from the text area only ,not from the value area

1 Like

Or another idea if it is possible move components with right click instead of left click

I like this idea. Segment the movement from the changement…

I don’t like this idea since users muscle memory is already set to move the canvas with right-click.

But I like the idea to have a component locked on place. Perhaps some boolean parameter in context menu, default being movable.

In my opinion they are equally annoying but if you move the value and you have a heavy calculation depending on it, GH/Rhino will enter a non-responsive state.

The same quesion again?
We can see that the position of PlaceHolder Component is locked, can we do the same to other components?

Of course you can.

using System.Linq;
using System.Drawing;
// Find the component by name (some components may not derive from GH_Component!)
GH_Component comp = GrasshopperDocument.Objects.Where(o => o.Name.Contains("Circle")).First() as GH_Component;
// Change the Pivot to something stupid...
comp.Attributes.Pivot = new PointF(float.NaN, float.NaN); (4.1 KB)


Excellent thank you Tom