提交当前本机整理版本

This commit is contained in:
cyf
2026-07-02 10:11:39 +00:00
parent c10a5d64c7
commit aacefa24f8
822 changed files with 196665 additions and 14263 deletions
+28 -1
View File
@@ -10449,4 +10449,31 @@ namespace Lskj.Control
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void GridView_MouseWhee
private void GridView_MouseWheel(object sender, MouseEventArgs e)
{
HandledMouseEventArgs handledArgs = e as HandledMouseEventArgs;
if (handledArgs != null)
{
handledArgs.Handled = false; // 放行事件,允许系统处理Shift+滚轮
}
if ((ModifierKeys & Keys.Shift) == Keys.Shift)
{
// 滚轮方向判断
int scrollStep = e.Delta > 0 ? -20 : 20; // 滚动步长,可调整(建议10-30)
// 计算滚动条位置
int newLeftCoord = gridView.LeftCoord + scrollStep;
newLeftCoord = Math.Max(0, newLeftCoord);//Math.Min(newLeftCoord, maxLeftCoord)
// 移动滚动条位置
gridView.LeftCoord = newLeftCoord;
if (handledArgs != null)
{
handledArgs.Handled = true;// 阻止默认垂直滚动
}
}
}
#endregion
}
}