I have a panel, lets says this panel is 500px in height. Inside that panel is a multiline textbox, which is bigger than the panel - let's says the height is 1000px.
The panel is set so that the scroll bar appears, and it scrolls fine with the mouse wheel and by dragging the scroll bar. However, When selecting text in the textbox (highlighting) and then dragging the selection beyond the displayed text it does not scroll, but I want it to. Much like when you select text in a browser beyond what is visible.
It is probably worth noting that my panel is customized, although not much, I have simply added the following code to prevent an issue with setting focus on the textbox, which causes it to scroll to the bottom:
class PanelNoScrollOnFocus : Panel
{
protected override System.Drawing.Point ScrollToControl(Control activeControl)
{
return DisplayRectangle.Location;
}
}
I got this code from here, so you can see more info about why I am using it if need be.