SourceGrid.GridVirtual.ScrollOnPoint C# (CSharp) Method

ScrollOnPoint() public method

Move the scrollbars to the direction specified by the point specified. Method used by the Mouse multi selection (MouseSelection.cs)
public ScrollOnPoint ( Point mousePoint ) : void
mousePoint Point
return void
        public void ScrollOnPoint(Point mousePoint)
        {
            //TODO Sarebbe bello chiamare questo metodo a secondo del tempo in cui il mouse si ferma nell'area esterna e non in risposta al MouseMove. Magari aumentando anche la velocità di scroll se il mouse è più lontano e ragionamenti analoghi.

            //Scroll if necesary
            Rectangle scrollRect = GetScrollableArea();

            if (mousePoint.X > scrollRect.Right)
                CustomScrollLineRight();
            if (mousePoint.Y > scrollRect.Bottom)
                CustomScrollLineDown();
            if (mousePoint.X < scrollRect.Left)
                CustomScrollLineLeft();
            if (mousePoint.Y < scrollRect.Top)
                CustomScrollLineUp();
        }