Adding scrollbars to UserControl

Posted by Bevin on Stack Overflow See other posts from Stack Overflow or by Bevin
Published on 2010-04-10T19:41:31Z Indexed on 2010/04/10 20:03 UTC
Read the original article Hit count: 385

Filed under:
|
|
|

I am trying to add vertical and horizontal scrollbars to my UserControl with the HorizontalScroll and VerticalScroll properties, but I am having extreme issues. My problem arises when I drag or manipulate the scroll box on the bar. When I let it go, it simply jumps back to the start position!

I know of the AutoScroll property, but I do not want to use it since I want to be able to control every aspect of my scrollbars, and I don't want it to be done automatically. Also, according to the documentation, AutoScroll is for "[enabling] the user to scroll to any controls placed outside of its visible boundaries" which isn't what I want. I just want scrollbars.

...aaand I suppose I could add VScrollBar and HScrollBar to the control, but why should I do this when the scroll functionality already exists? Seems like a waste to me.

© Stack Overflow or respective owner

Related posts about scrollbar

Related posts about c#