Class GridAutoScroller
Represents a class which handles the automatic scrolling of content when the user drags the pressed mouse to an edge of the control.
Inheritance
Inherited Members
Namespace: Syncfusion.Windows.Forms.CellGrid
Assembly: Syncfusion.Spreadsheet.Windows.dll
Syntax
public class GridAutoScroller
Constructors
GridAutoScroller()
Initializes a new instance of the GridAutoScroller class.
Declaration
public GridAutoScroller()
Properties
AllowScrollingOnOutsideBounds
Gets or sets the value that indicates whether perform auto scrolling outside the bounds or inside the scroll margin.
Declaration
public bool AllowScrollingOnOutsideBounds { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | True or False. |
AutoScrollBounds
Gets or sets the outer scrolling area. Typically the client area of the control.
Declaration
public Rectangle AutoScrollBounds { get; set; }
Property Value
Type | Description |
---|---|
System.Drawing.Rectangle | Outer Scroll area. |
HorizontalScrollBar
Gets the state describing the horizontal scrollbar.
Declaration
public IScrollBar HorizontalScrollBar { get; }
Property Value
Type | Description |
---|---|
IScrollBar | The horizontal scrollbar state. |
InsideScrollBounds
Gets the inside scrolling area. The control will scroll if the user drags the mouse outside this area.
Declaration
public virtual Rectangle InsideScrollBounds { get; }
Property Value
Type | Description |
---|---|
System.Drawing.Rectangle | Inside Scroll area. |
InsideScrollMargin
Gets or Sets the default margin for the scrolling area when the user moves the mouse to the margin between InsideScrollBounds and AutoScrollBounds
Declaration
public Size InsideScrollMargin { get; set; }
Property Value
Type | Description |
---|---|
System.Drawing.Size | Margin of Scroll area. |
IntervalTime
Gets or sets the timer interval for auto scrolling.
Declaration
public TimeSpan IntervalTime { get; set; }
Property Value
Type | Description |
---|---|
System.TimeSpan | Time interval. |
IsEnabled
Gets or sets the value whether to enable or disable the AutoScroller.
Declaration
public bool IsEnabled { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | True or False. |
Orientation
Disables or specifies the direction for automatic scrolling when the user drags the mouse cursor out of the scrolling area.
Declaration
public AutoScrollOrientation Orientation { get; set; }
Property Value
Type |
---|
AutoScrollOrientation |
VerticalScrollBar
Gets the state describing for the vertical scroll bar.
Declaration
public IScrollBar VerticalScrollBar { get; }
Property Value
Type | Description |
---|---|
IScrollBar | The vertical scroll bar state. |
Methods
AutoScroll(Point)
Calculates the auto scroll index and scrolls to a particular position in the grid.
Declaration
protected virtual void AutoScroll(Point mousePoint)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Point | mousePoint | Position of the mouse. |
OnAutoScrollingChanged(EventArgs)
Raises the AutoScrollingChanged event.
Declaration
protected virtual void OnAutoScrollingChanged(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e | An System.EventArgs that contains the event data. |
RaiseAutoScrollerValueChanged(Boolean, Boolean, Boolean, Boolean, RowColumnIndex)
Invokes the AutoScroller Value changed event.
Declaration
protected virtual void RaiseAutoScrollerValueChanged(bool isLineUp, bool isLineDown, bool isLineLeft, bool isLineRight, RowColumnIndex rowColumnIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | isLineUp | true when scrolling direction is up. |
System.Boolean | isLineDown | true when scrolling direction is down. |
System.Boolean | isLineLeft | true when scrolling direction is left. |
System.Boolean | isLineRight | true when scrolling direction is right. |
RowColumnIndex | rowColumnIndex | scrolling row column index |
ResetInsideScrollMargins()
Resets the InsideScrollMargin property to its default value.
Declaration
public void ResetInsideScrollMargins()
Events
AutoScrollerValueChanged
Occurs when the auto scroller value changed .
Declaration
public event GridAutoScroller.AutoScrollerValueChangedEventHandler AutoScrollerValueChanged
Event Type
Type |
---|
GridAutoScroller.AutoScrollerValueChangedEventHandler |
AutoScrollingChanged
Occurs when the AutoScrolling property is changed.
Declaration
public event EventHandler AutoScrollingChanged
Event Type
Type |
---|
System.EventHandler |
Remarks
If you want to prevent autoscrolling, you should handle this event and reset the AutoScrolling property.