Layout moves in Drawables cannot be redrawn

import Eto
import Eto.Forms
import Eto.Forms as ef
import Eto.Drawing
import Eto.Drawing as ed
import Rhino as rh
import Rhino
import rhinoscriptsyntax as rs
import scriptcontext as sc
import os


class Scroll_Control(ef.Drawable):
    def __init__(self, pr=None):
        super().__init__()
        self.pr = pr
        self.L2 = ef.DynamicLayout()
        for j in range(80):
            lb2 = ef.Label()
            lb2.Text = f"Layout{j}"
            self.L2.AddRow(lb2)

        self.Scrolling_Layout = ef.PixelLayout()
        self.Scrolling_Layout.Add(self.L2, ed.PointF(0, 0))
        self.Content = self.Scrolling_Layout

        self.offset_y = 0  # AddLayoutoffset_y

    def OnMouseDown(self, e):
        self.offset_y -= 20
        self.Moving_Layouts(ed.PointF(0, self.offset_y))

    def Moving_Layouts(self, offset):
        for ctrl in self.Scrolling_Layout.Controls:
            self.Scrolling_Layout.Move(ctrl, offset)
        self.Scrolling_Layout.UpdateLayout()
        self.Scrolling_Layout.Invalidate()
        self.Invalidate()



class FloatingForm(Eto.Forms.FloatingForm):
    def __init__(self):
        super().__init__()

        self.Title = None

        self.Topmost = True

        self.Height = 180


        self.Content = Scroll_Control(pr = self)

if __name__ == "__main__":
    form = FloatingForm()
    form.Show()

It is not possible to redraw the layout after refreshing the layout again. There is no good idea at present. Have any friends encountered this problem

@curtisw @CallumSykes Sir, do you know where my problem is?

self.Scrolling_Layout.UpdateLayout()
self.Scrolling_Layout.Invalidate()
self.Invalidate()

@tom33 I think the way you’re using Pixel Layouts and Drawables might not be helping you achieve what you want. The reason I say this is you’re not using the paint event of a drawable so I think you’re using it like a panel? Could you draw a sketch of the UI you’re trying to achieve?

I wanted to implement a custom stack scrollable layout, but couldn’t repaint the layout after moving it

I think it’s possible a GridView with Custom Cells may do what you want. Take a look at these docs and let me know if they are what you’re trying to achieve → Rhino - Cells

Note that this code currently has some issues in python, but I’m sure with some jiggling it’ll work well → ETO, Python: GridView.DataStore is not populating data - #4 by Domenic_Gallo

Thank you Sir. I’ll try now

The problem I’m having so far is that the layout will automatically crop the child controls that are out of the scope of the layout. After moving the layout, the child controls will not be displayed