Auto-fitting widgets to window height

Hi everyone, I’m setting the size of a background shape OnWindowResize to be [[This.width]] and [[Window.height]]. I’m also forcing the shape to appear down the right-hand side of the window by moving using [[Window.width - Target.width]] and [[]]. However, when I resize the browser, I’m getting a block of white space underneath the shape, instead of it automatically adjusting to the size of the window.

Am I doing something wrong? Is there a better way?

Can anyone help?


Can you share a file showing the problem? I tried to recreate it following your description and it seems to work just fine.

Hi, here you go. I’ve tweaked things slightly since my original post, but still have a weird behaviour in the right-hand pane. If you click Help or What’s New, you’ll see the right-hand pane appear. If you resize the browser, you’ll see that the pane doesn’t auto fit.


ForceHeightAndPosition.rp (232.9 KB)

Not seeing it. Looks fine when run on my computer in Chrome. No weird spaces.

One thing I did notice looking at my original recreation is sometimes, if you resized very fast, the scrollbars would appear/disappear as you resized and on occasion it seemed the resize of the widget would happen before the scrollbars vanished and there was a small gap left that was the size of the scrollbars in the browser.

Hi again, that’s strange because I’m still seeing it. I’ve attached a new demo project which just has the different shapes on it. What I’m seeing now when I resize the browser is a horizontal scrollbar and a block of white space down the right-hand side.

What I want to achieve is a layout where the right-hand pane is fixed to the right-hand side of the window, is 100% high, and resizes correctly without showing any scrollbars.


ForceHeightAndPosition.rp (57.6 KB)