回复 8楼wangTest的帖子
Hi WangTest,
请使用以下代码测试:
- private void Form1_Load(object sender, EventArgs e)
- {
- this.fpSpread1.MouseWheel += new MouseEventHandler(fpSpread1_MouseWheel);
- this.fpSpread1.TopChange += new FarPoint.Win.Spread.TopChangeEventHandler(fpSpread1_TopChange);
- }
- bool iswheel = false;
- void fpSpread1_TopChange(object sender, FarPoint.Win.Spread.TopChangeEventArgs e)
- {
- if (iswheel)
- {
- this.fpSpread1.SetViewportTopRow(0, 0);
- iswheel = false;
- }
- }
- void fpSpread1_MouseWheel(object sender, MouseEventArgs e)
- {
- iswheel = true;
- }
复制代码 |