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:

  1. Tell the program to the user has scrolled from 10 pixels to the left
  2. Forward the current drawing takes 10 pixels to the left
  3. 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

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -