Hi Michael, im beginning to start learning eto. I see this working in rhino 8, any chance you could help with getting this working in rhino 7? Currently I get this message
Message: Cannot change AllowsTransparency after a Window has been shown or WindowInteropHelper.EnsureHandle has been called.
Traceback:
line 38, in MyFormStyler, "C:\Users\thoma\Downloads\SampleTransparentForm_CG (1).py"
line 54, in DoSomething, "C:\Users\thoma\Downloads\SampleTransparentForm_CG (1).py"
line 57, in <module>, "C:\Users\thoma\Downloads\SampleTransparentForm_CG (1).py"
This means you are trying to do something to your window or panel after setting the style. I need to see your code where you are trying to apply the form styler
It has something to do with the order of trying to apply the styling and the Eto.Form.Form window already being created first.
I tried to debug and fix in R7 but no luck and I don’t develop in R7 so I’m not familiar enough with the nuances between R7 and 8 regarding Eto.Forms.
Given that the code works in both Python2 and Python3 in R8… I’m guessing its not a python issue but something with the order of execution or form handling in R7 Eto…
@clement and @curtisw do either of you happen to know why applying the style code to the window works fine in R8 but not R7?
Just as an aside, I was able to get window transparency built-in to Eto recently, so you’ll be able to simply set the Window.BackgroundColor to a semi or fully transparent color in Rhino 8.20 or later.
Hi Clement, does this also work with dialogs. I tried set one up but couldn’t figure it out. I tried self.Opacity but that seems to also make the button transparent as well which I want to avoid.
HI @Tommy804, in Rhino 8 it works with Form or Dialog, Dialogs can be modal or semimodal. The button stays opaque as in my example. I hope with SR20 this all gets easier…