CustomControl/ScrollFlowLayoutPanel.cs
(完整代码) 997Busing System;
using System.Windows.Forms;
namespace AppManager.CustomControl {
///
/// 支持滚轮的FlowLayoutPanel.
///
internal class ScrollFlowLayoutPanel : FlowLayoutPanel {
protected override void OnMouseClick(MouseEventArgs e) {
base.OnMouseClick(e);
}
protected override void OnMouseEnter(EventArgs e) {
base.OnMouseEnter(e);
}
protected override void OnMouseWheel(MouseEventArgs e) {
if (e.Delta < 0) {
if (this.VerticalScroll.Maximum > this.VerticalScroll.Value + 50)
this.VerticalScroll.Value += 50;
else
this.VerticalScroll.Value = this.VerticalScroll.Maximum;
} else {
if (this.VerticalScroll.Value > 50)
this.VerticalScroll.Value -= 50;
else {
this.VerticalScroll.Value = 0;
}
}
}
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。