iom
May 9, 2023, 7:56am
1
Hi there,
when you create a GH_Panel in C# (var panel = new Grasshopper.Kernel.Special.GH_Panel();
), how can I control the size of it on the GH canvas?
Thanks!
Hi,
That’s a matter of defining the Pivot
and Bounds
properties of the Attributes
of the Panel.
Done here :
Fow what it’s worth, here is a C# script that you can activate to reduce those panels after switching back to short names mode. I don’t think it’s that useful but at least I learnt some things in the Grasshopper API. My attempts at triggering it automatically on a canvas redraw have resulted in two computer crashes so I’ll stick with the button click for now !
It only affects panels without a Nickname and that are in Multiline Data mode, so presumably panels with a single line of text.
[Redraw…
1 Like
iom
May 9, 2023, 10:32am
3
sweet, thanks a lot, works perfectly!