Is it possible to set a panel color based on a boolean value? i have created an example of what i want to achieve in the picture below.
Check this:
panel_color_c.gh (18.9 KB)
where can i find the plugin
It’s not a plugin, just the Rhino 8 grasshopper script editor component
This would be super useful in Rhino 7 too - is there a way?
I use the ‘legend’ component, you can feed it color and text. easy.
additionally have a look at metahopper. there some examples posted at the forum in the past.
Here’s a Rhino 7 solution that works for a list of named panels:
240118_ColorPanelsBoolean_GHPython.gh (6.1 KB)
Got it. Thanks for the demo!
That’s super slick. Thank you.
This code also effects the panels without a title. Is there any way to avoid this?
I’m afraid I can’t reproduce that behavior:
I didn’t test but, check if you entered an empty line in the names list…
Hi. Nice and useful script. However looks like I cannot use two of them into the same definition. It is possible to adapt the script so to be able to use two ore multiple instances of this script in the same definition? Thank you.
Can you be more specific? They seem to work fine on my system (Rhino 7 SR37):
I have no idea why but looks like in my definition I don’t have the same result. The second instance of the script just don’t change the color of the designated panel in the canvas. I do also use Rhino7 SR37 on Windows11 system.
P.S. Ok, sorry my mistake, I was using a panel with True or False result for the Bool input of the script instead of a Boolean component. Problem fixed, thank you for this script.
Try posting a file and we can have a look.
Fixed. See my previous post.
This is Rhino 8 and beyond