Dear GH folks, dear David,
I’ve implemented a couple of custom component attributes to have sliders, buttons and other controls on top of Grasshopper components.
With my dropdown I’m running into trouble if the profiler widget is activated and the expanded dropdown exceeds the component bounds at the bottom.
Afaik the profiler boxes are not drawn by the components but by the profiler widget. The widgets are pretty far to the end of the drawing pipeline so the profiler boxes will always be on top of the components.
I have two ideas:
- subclass
Grasshopper.GUI.Widgets.GH_ProfilerWidget
and redo it’s render method so it will not render the profiler box for components that have some special flag set (e.g.false
if they have a dropdown and it is expanded,true
otherwise). However, how can I tell GH to load my modified profiler widget instead of the original one? - Expand the bounds of my component to include the expanded dropdown. This has to be done after its own
Render
method was called because otherwise I’m messing up my component capsule. This feels pretty hacky but might be the way to go if the other way does not work…
Are there any other ways to tackle this problem? Which is more doable / elegant?
Thanks in advance!
Best,
Paul