Resizing Plugin Window Issues

I have just been experimenting with the resizable border component, but I have had some issues with how it behaves. Note: I am using Reaper as the DAW (not sure if that matters though).

So resizing works fine here if I drag from the bottom edges:-

image

But if I try to resize from the top edges this happens:-

Although the size of the window has extended the 0,0 position is now off the screen in the bottom image. What have I done wrong?

EDIT: Oh… wait… is this why I need a component bounds constrainer? hahaha. I was just experimenting with the border component as I am aware you can use the ‘setResizable’ method to do this but I wanted to look into the resizable border component to test it out.