Eto.CodeEditor Covers Menu Bar

Hello, I created an Eto.CodeEditor object and put it in a DynamicLayout, then set this layout as the content of a Eto.Forms.Scrollable object. When I scroll down, the code editor covers the above menu bar and all other elements in the window (please see the screenshot below). I was wondering what should I do to avoid this? Thank you in advance!

My guess is that the scrollable object needs to contain only the CodeEditor area.

MainWindow (StackLayout)
    +-- MenuStrip
    +-- ScrollableObject
            +-- CodeEditor
    +-- Other buttons

Hi @Kaushik, I tried putting only the code editor under the scrollable, and it still covers everything else between the title bar and the lower boundary of the form.

Hey @Yao,

The CodeEditor has a built-in scrollbar so you don’t need to use a Scrollable.

The technical reason why it shows over other UI elements is that it is a win32 control hosted in WPF using a WindowsFormsHost, which does not support the ability to be clipped.

Hope this helps!

Hey @curtisw,

Thank you very much for your clarification! Yes, it helps a lot for understanding what’s happening under the hood.

I saw the built-in scrollbar within the code editor, but I still would like to have the outer Scrollable because I have other elements in the window that I want to scroll up and down altogether with the code editor. Just curious could there be any way to work this around? Thanks!

–Yao

Unfortunately, there is no way around this at this point. There are similar issues using things like the WPF Edge/WebView2 control, which Eto’s WebView control uses.