Element.layoutElements() & screen.layoutLayers();

Is it ever necessary to call either of these methods? Or does this happen automatically when a value (say x, y, width, height) is changed?

Just curious…

If you change the constraints on an element then I sometimes need to call getParent().layoutElements() afterwards to have the change shown.

(I’d guess the reason that it’s not done automatically is because laying out is fairly expensive and there are cases where I modify 10 elements then make one relayout call to their parent).

1 Like