Displaying text / images within an item's bounds?

This is a difficult one I think, I doubt it’s possible. I have a dialog system where text is displayed inside a floating rectangle (no widgets) and I need to be able to scroll up and down without the text breaking the confines of the box.

Is there any way to graphically cull the contents of the box (any text / images it may contain) so that they always appear to stay within the rectangle?

Edit: sort of like Photoshop’s clipping mask feature.