algorithmic modeling for Rhino
Hi,
I want to change some properties of all component panel connected to an output:
Here I can change the colour of panels easily:
But when I try to change font-size and some other properties, I get this error:
"can't assign to read-only property Size of type 'Font'"
Is there anyway to change these properties of a panel through python?
Tags:
you have to create a new font to assign it. try this:
import System
for output in ghenv.Component.Params.Output[1].Recipients:
if output.Name == "Panel":
currFont = output.Properties.Font
font = System.Drawing.Font(currFont.Name,size)
output.Properties.Font = font
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by