Viewport for multiple buttons, ...?

Guys, sorry if this is a stupid question, but after reading a lot of the docs, I couldn´t find what I was looking for. The idea is to have multiple things in a window with a scroll-bar to go up and down, since the number of items is too big for the whole window. I see that the Viewport does that for a single item, but not for multiple items. So, do I need to manually take care of this, or is there another way? I would manually replace things on the screen according to the resize + scroll-bar position, but I wonder if that´s “smart”… :wink:

Thanks! :mrgreen:

Best Regards, WilliamK

Create a container component, put your buttons on that - put the container component on the Viewport

Rail

1 Like

Ach, that´s perfect, thank you so much! I´m glad I asked, before spending hours and hours for nothing. :oops: Thanks again.

Best Regards, WilliamK

William, did you go anywhere with the other approach? It occurs to me that a ‘virtual viewport’ might be useful in that you get better control of how each component gets to its new position (for instance a staggered animation).

Bruce

The idea is to create a custom object and use the viewport, I hope that´s all it takes. :wink:

Yes, viewports are supper easy. it doesn’t even need to be a custom component, as I recall. A generic ‘Component’ works.

But I was thinking more about your approach of manually tracking objects, the idea being that they would get a new position from scrolling, but would be responsible for their own position (or there parent would, I suppose). That way, it doesn’t have to be a vanilla scroll.

Bruce