Dynamically Creating a Scrolling Text Box

So, I know how to dynamically create a text box. Is it possible to dynamically create this box with scrolling capabilities? Do I need to dynamically attach a scrollbar component? If so, could you explain or give an example?

Many thanks in advance.

Regards,