How can I create a zoomable widget?

I’m trying to create a canvas of sorts, the Drawing Area is a border with a Render Target inside it. I want this to be able to zoom so the canvas could increase in size. But using Render Transforms to increase the scale makes the canvas overlap other widgets.

Is there a way to cutout the widget so that it remains within its bounds but still scales? I also need a system to scroll across the canvas once its zoomed in.

Any ideas please?

I think it can be done through the scroll box but I’m trying to mess with it to see how to do it

You can use retainer box, it will cut everything outside.

I tried named slot, it does not cut, so you can ignore it.

This explains retainerebox:

1 Like

Would it allow me to scroll the contents inside?

Check this out, see if it fits:

When it comes to clipping, widgets can:

No it is just to clip to rectangle.

Then use that named slot and your own widget inside to do scrolling:

  • create your own widget that scrolls/pans what you need, with for eg anchors, or scroll box
  • use that widget to pan stuff, then clip it all with retainer box.

Would it be possible for you to provide an example of such widget? I’ve been trying to make a render target stretch so that I can use a scroll bar to scroll across the stretches surface

This looks promising! I’ll try implementing it in my project as soon as I’m at my desk tomorrow and get back to you with the results