0

enter image description here With code I want to plot 96 lines. The code to plot is all working fine. But I am unable to view complete plot because graphics is exceeding the size of panel. How to make panel auto-scroll depending on size of graphics in it? if the graphic is large, I want panel to have horizontal scroll bar and with help of horizontal scroll bar I want to move over the graphics to see it completely. With the following code I am getting horizontal scroll bar.. But when I hold scroll bar and try to move it, I am not above to view graphics moved

    Panel1.AutoScroll = False
    Panel1.HorizontalScroll.Enabled = True
    Panel1.HorizontalScroll.Visible = True
    Panel1.AutoScroll = True
  • 3
    There's nothing to scroll. You would need to put a child control inside the `Panel`, make it big enough to contain the entire drawing and then draw on that. The `Panel` will then auto-scroll to display that entre child control. I would suggest making it a `PictureBox`. – jmcilhinney Mar 24 '23 at 11:04
  • Or [Panel for drawing graphics and scrolling](https://stackoverflow.com/a/4306333/14171304) Or [How to make use of AutoScrollbar when drawing contents with GDI+](https://stackoverflow.com/a/8727320/14171304) Or [Show Scrollbars if the height of a shape is greater than the Form's height](https://stackoverflow.com/a/58942269/14171304)....etc. – dr.null Mar 24 '23 at 18:13

0 Answers0