4.40版源码,找到SourceGrid/SourceGrid/Common/CustomScrollControl.cs 这个文件

 

定位 CustomScrollWheel() 方法,把if条件判断去掉。或者把rotationDelta的值做相应调整也行。

 

改后代码如下:

public virtual void CustomScrollWheel(int rotationDelta)
        {
            //if (rotationDelta >= 120 || rotationDelta <= -120)
            //{
                if (VScrollBarVisible)
                {
                    Point current = CustomScrollPosition;
                    int newY = current.Y +
                        SystemInformation.MouseWheelScrollLines * VScrollBar.SmallChange * -Math.Sign(rotationDelta);

                    //check that the value is between max and min
                    if (newY < 0)
                        newY = 0;
                    if (newY > MaximumVScroll)
                        newY = MaximumVScroll;

                    CustomScrollPosition = new Point(current.X, newY);
                }
            //}
        }

 

SourceGrid为了避免过于频繁的调用滚动操作,加了这个判断,但没考虑到有些鼠标的MouseWheel一次滚动是小于这个值的。

 

搜不到有人记录过这个问题,随记在此,希望遇到同样问题的同学能搜到。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-13
  • 2022-12-23
  • 2021-12-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-08
  • 2021-09-08
  • 2021-05-19
  • 2021-09-03
  • 2022-12-23
相关资源
相似解决方案