c# - Is it possible to trigger a "fake" scroll progmatically in WinForms? -
Is it possible to trigger a "fake" scroll in WinForms practically?
Scenario:
A system with different pictures on it. Drawing (and a scrollbar) was done with
What do I need:
- Tell the program to the user has scrolled from 10 pixels to the left
- Forward the current drawing takes 10 pixels to the left
- Form creates a paint event that has claprectoragulle with only right-handed 10 pixels which are now empty.
Is it possible or do I have to handle it myself?
You can add a panel in the form that is larger in the form. Close the scroll bar and manually scroll the panel by setting the properties of the vertical scroll and Horizontal Sockel properties of the panel.
Then add your drawing to the panel instead of form.
this.panel1.VerticalScroll.Value = 50; This.panel1.HorizontalScroll.Value = 100;
Comments
Post a Comment