Set default state of a EtoCollapsibleSection

Is it possible to set the state of an EtoCollapsibleSection to expanded or to collapsed by code?

Márton

I think you are looking for

https://developer.rhino3d.com/api/RhinoCommon/html/P_Rhino_UI_Controls_ICollapsibleSection_InitiallyExpanded.htm

Yes, I have seen that too, but that is read only I think.

Márton

You are deriving from EtoCollapsibleSection. You are supposed to override InitiallyExpanded, return true for it.

override public bool InitiallyExpanded => true;

Ohhh, this was declared virtual.

Sorry, you are right, it should have been obvious.

Thanks!