Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
912
Can UltraPictureBox be made scrollable?
posted

I understand that if you have ScaleImage on and the picture is 'bigger' than the control size, the control will downsize it to fit within the control.  What I would like to do is be able to specify that the control not scale the image, rather, if the image is bigger than the control, the control would have horizontal and vertical scrollbars so the user could scroll within the image.   Can this be done???

Parents
No Data
Reply
  • 37774
    posted

    The UltraPictureBox doesn't provide any sort of AutoScroll property to do this, but this is a really simple issue to work around.  What you should do is put the UltraPictureBox into a Panel, ensuring that the Panel is the size that you'd like (perhaps the same size as the UltraPictureBox is currently in your project).  What you would then do is set the AutoScroll property on the Panel to True while setting the picturebox's ScaleImage property to Never and AutoSize to True.  This should cause the panel to stay a consistent size and will display scrollbars when the image is larger than the available size.

    -Matt

Children
No Data