How can I slide the scroll bar of a Panel?

Hello folks, How can I slide the scroll bar of a Panel with an external slider?
Any help would be appreciate it

cc @TomTom @andheum
SharedScreenshot (12.6 KB)


ScrollRatio property seems to do the trick.

foreach( var obj in GrasshopperDocument.Objects)
      if (obj.GetType().ToString() == "Grasshopper.Kernel.Special.GH_Panel"){
        if (obj.NickName == name)
          Grasshopper.Kernel.Special.GH_Panel panel = (Grasshopper.Kernel.Special.GH_Panel) obj;
          panel.ScrollRatio = s;


It would be so great to scroll panels with a scroll wheel.

1 Like

Sliders and value lists too…

1 Like

Technically you can solve the problem like @magicteddy showed, but I like to add that you should question the purpose of doing so. In practice you would need this feature to check data on a larger list. The problem is that panels are not really suited to check larger data. They can cause a significant performance hit, and the UI element is hard to control.

In order to check large and flat data lists, I would rather use a script component with an LINQ query.
E.g. inputList.Contains(“Q”) or inputList.Any(e => e == “Q”). With the extension method “Any” you can also access instance members, such as properties or methods. There are many useful LINQ extension methods.

As an alternative, you could also extract a sublist and only attach a panel to this subset, by moving the start index of the sublist you can also mimic this behavior without writing code

For even nicer debugging. You can use DNSpy. Decompile the Grasshopper dlls and attach to the active Rhino process. With that you can even set a breakpoint at the corresponding Grasshopper component and simply check the data by stepping through the code.

1 Like

and also the bloddy panel.

Thank you @TomTom for your always valuable feedback.
I was using it for a comparison between 2 “similar” panels, sometimes I prefer to use a visual inspection, but you are right that long lists are not practical.

Anyway, is it possible to change value colours individually like this?