1. I built a draggable frame, and within this frame are attached other frames. I made sure that this frame can not be dragged beyond the edges of the screen with ClampedToScreen. But the final frame can be dragged over the right and bottom edge of the screen. The container frames and frames that will be attached to the inside are created by these functions

    XML: http://nopaste.me/paste/61071414150cf81de0443c LUA: http://nopaste.me/paste/866907550cf824458992

    Clamping only works for the size of the frame. Your frame is 1x1. Make it the size of all of the items that are supposed to be in 'the container'.

    There is another way, perhaps using Region?. The contents of the container frame is variable, so I can not set a fixed size

    Then change the size of the contents frame as required, or set clamped on every frame you want to be clamped. The clamp logic is very simple, it prevents the right-edge of the frame that is clamped from moving off the screen. If that right-edge is 300 pixels to the left of your content, then it will not work.

    Several different ways you can make this work!