How to get scrollbar in Panel in VB.Net?

Brijesh Patel picture Brijesh Patel · Sep 20, 2012 · Viewed 54.8k times · Source

I am developing a Windows Application in VB.Net. In that, there is one case where there is one form, and in that form there is a Panel, and within the Panel there is a rich text box.

So my requirement is to get a scrollbar in the Panel. So when the user does scroll on the panel, the rich text box can scroll accordingly like MS Office functionality..

Can any one give me an idea how to do it?

Answer

Peladao picture Peladao · Sep 20, 2012

Set Panel.AutoScroll = True and scrollbars will automatically appear whenever any controls in the panel fall outside its boundaries.