System.Windows.Forms.ScrollableControl.SetAutoScrollMargin Method

Sets the size of the auto-scroll margins.

Syntax

public void SetAutoScrollMargin (int x, int y)

Parameters

x
The System.Drawing.Size.Width value.
y
The System.Drawing.Size.Height value.

Remarks

The margin sets the width and height of the border around each control. This margin is used to determine when scroll bars are needed on the container and where to scroll to when a control is selected.

Note:

If a negative number is passed in as the x or y values, the value will be reset to 0.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0