I want to use the same functionality available when a Panel.AutoScroll is true, but with the scrollbars invisible.
To do so I need to know how can I scroll to left/right up/down using functions in my code.
I want to use the same functionality available when a Panel.AutoScroll is true, but with the scrollbars invisible.
To do so I need to know how can I scroll to left/right up/down using functions in my code.
You should be able to use the VerticalScroll and HorizontalScroll properties of the component:
c.HorizontalScroll.Value += 100;
c.VerticalScroll.Value = c.VerticalScroll.Maximum;
There's probably a property on the panel to do this, alternatively you can loop through all the panels children and adjust their positions.
Eg. to move all controls 10 px:
int xoffset = 10;
foreach(Control c in panel1.Controls)
c.Location.X += xoffset;
The controls can be moved to negative positions to make them move out of the panel, similarly they can have location values bigger than the panels size to make them move out of the panel.
Well if you don't want to use the Autoscroll property, there's a way that I used a long time ago.
It's simple and works beautifully.