Eto.Forms Scroll not working

Hello everyone,

I’m trying to make a custom panel scrollable but nothing seems to work. I have a DynamicLayout I’m building and then passing as Content for a Panel. I tried the following:

  1. .BeginScrollable() & .EndScrollable on the DynamicLayout
  2. setting the DynamicLayout as Content for a Scrollable object
  3. using a DynamicScrollable where I’m passing each DynamicLayout Row as a Dynamic Object for the Scrollable (though I’m not sure if I did this one right).

Any suggestions would be appreciated.

for point 2 the code is:

Scrollable dynamicScrollable = new Scrollable();
            dynamicScrollable.Padding = new Padding(16);

DynamicLayout MasterLayout = new DynamicLayout();
MasterLayout.AddSeparateRow(_prefix);
MasterLayout.AddSeparateRow(_suffix);
MasterLayout.AddSeparateRow(_tabs);
MasterLayout.AddSeparateRow(_tableOptions1);
MasterLayout.AddSeparateRow(TextDisplay);
MasterLayout.AddSeparateRow(B_Run);
MasterLayout.AddSpace();

dynamicScrollable.Content = MasterLayout;

            Content = dynamicScrollable;

Can you provide code to a working sample - one we can run here?

– Dale

Hello @dale , I made a very basic example for the issues mentioned. I’m using Scrollable as described in point 2 above.
ScrollDynamicLayoutIssue.zip (98.1 KB)

A couple of things here.

  1. there’s no need to set a fixed height of 1600 to the panel in the constructor. Your scrollable is sized to that fixed panel size and never able to resize since its a fixed size, thus no scrolling.

  2. Scrollable is derived from the Panel class so you can inherit it in your own panel vs using a panel and then setting its contents with a scrollable.

I’ve modified your sample a bit to show this. Hope it helps.

ScrollDynamicLayoutIssue.zip (99.7 KB)