找回密码
 立即注册

QQ登录

只需一步,快速开始

beitesting

中级会员

28

主题

92

帖子

794

积分

中级会员

积分
794

活字格认证

beitesting
中级会员   /  发表于:2017-3-16 20:10  /   查看:2958  /  回复:1
版本:ComponentOne2016V3
问题:禁用FlexGrid的滚轮,使滚动鼠标滚轮时FlexGrid没有任何动作

1 个回复

倒序浏览
Alice
社区贡献组   /  发表于:2017-3-17 09:10:36
沙发
谢谢您的反馈。
禁用鼠标滚轮,需要您重写flexgrid的WndProc消息处理,在里面重新定义不接收滚轮消息。

  1. public class NoMouseWheelGrid : C1.Win.C1FlexGrid.C1FlexGrid
  2.     {
  3.         override protected void WndProc(ref Message m)
  4.         {
  5.             // ignore all mouse wheel messages
  6.             const int WM_MOUSEWHEEL = 0x020a;
  7.             if (m.Msg == WM_MOUSEWHEEL)
  8.             {
  9.                 return;
  10.             }

  11.             // process other messages as usual
  12.             base.WndProc(ref m);
  13.         }
  14.     }
复制代码
请点击评分,对我的服务做出评价!  5分为非常满意!

葡萄城控件服务团队

官方网站: http://www.gcpowertools.com.cn
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部