Rhino Material panel resizing

I need the tree control to grow as the panel grows. Is this possible please?

For reference, the tree is in a RhinoWindows.Controls.RenderContentUserControlCollapsibleSection. So I need it to expand and not the Notes panel.

Thanks

Paul

@maxsoder is there a way to have this work as requested?

I do not think it is possible. This is the MFC version maybe @johnc knows more?

There actually used to be support for this - I will log this as a bug.

https://mcneel.myjetbrains.com/youtrack/issue/RH-62222

I have fixed this in the MFC section / holder system but the fix is only in C++ / MFC. @maxsoder is going to add the fix to the C# side. For the record, here’s how to use the fix in MFC:

In your section code you have to override OnAttachedToHolder() and call SetFullHeightSection() :

void CMySection::OnAttachedToHolder(IRhinoUiHolder& holder)
{
    __super::OnAttachedToHolder(holder);

    holder.SetFullHeightSection(*this);
}

This fix should be available in version 7.3

John

Thanks. My plugin is written in C#, so please let me know when it is fixed there.

Paul

Please fix this ! It is really painful …

Yes, the bug is in my list and I will start working on it this week.

1 Like

Thank you, it is really appreciated !

The fix will be in v7.4.

Use EtoCollapsibleSection2 instead of EtoCollapsibleSection and override

    public override void OnAttachedToHolder(ICollapsibleSectionHolder2 holder)
    {
      base.OnAttachedToHolder(holder);

      holder.SetFullHeightSection(this);
    }

This will also work on the Mac version.

BR, Max

1 Like

Thanks @maxsoder

I have my panel defined as

public partial class OctaneMaterialTreeControl : RhinoWindows.Controls.RenderContentUserControlCollapsibleSection

How do I implement your fix in this situation please?

Thanks

Paul

Hi @pkinnane ,

It is not possible with the RenderContentUserControlCollapsibleSection. I have to implement a new class called RenderContentUserControlCollapsibleSection2 that contains the new interface. I will do it today.

Then you only need to inherit from RenderContentUserControlCollapsibleSection2 and override the OnAttachedToHolder.

Br,Max

1 Like

This is now implemented and it will be in v.7.4.

Br,Max

1 Like

Thanks Max.

Hi @maxsoder - I have /finally/ got to implementing this. I notice that when I scroll the main material panel, the actual tree (which now derives from RenderContentUserControlCollapsibleSection2) “jitters” as you scroll it. As you are scrolling the main material panel, the treeview panel moves to the left edge of the box it is in, and once you release the mouse it moves to the right to add a left margin.

Hi @pkinnane ,

There is a know problem we have when the Windows native MFC UI hosts an Eto UI section. So sometimes we have a ficker problem. I am unsure if this is it? Is it possible to get a video of this scrollbar jitter. It would be interesting to see what is going on.

Br, Max

Hopefully this video shows the issue @maxsoder

Thanks

Paul

1 Like

Thanks @pkinnane. I see how it jumps back and forth. I will try and reproduce this.

I have fixed the issue. The YT is here https://mcneel.myjetbrains.com/youtrack/issue/RH-63771 and the fix will be in v.7.6.

Br, Max

1 Like

Awesome - thanks @maxsoder

1 Like