怎么铺获TDBGrid上的鼠标滑轮事件???
解决方案 »
- 怎样读取Combobox中的值
- 请问dbgrid在查询时如何防止滚动?
- 我只知道vc的struct的使用,不知道 delphi的record如何捣腾,请高人指点。
- 请问要修改文件的内容用什么函数,介绍一下fileSeek的用法,我看帮助不是很清楚
- delphi能否快速获得一个文本文件中某个字符的数目
- 在Intraweb中怎样动态创建一个Cache文件
- 简单问题:TOpenDialog,怎么知道用户选中了多少个?
- 对这条语句中的HANDLE不明白?
- 我用Twebbrowser做的多页浏览器太耗资源了!!!
- 为什么会出现截取字符串错误???
- 我time字段里的数据都为2004-06-10 17:18:58.000 我想通过2004-06-10查询到它该怎么实现呀
- 请问有没有函式判断一个字串:'C:\TMP\TEST' 是 文件 还是 目录 呢?
procedure CMMouseWheel(var Message: TCMMouseWheel); message CM_MOUSEWHEEL;procedure TCardTempletOcx.CMMouseWheel(var Message: TCMMouseWheel);
var
pos: integer;
begin
if RateCob.Focused or CobFont.Focused then
begin
//Showmessage('');
exit;
end; if Not Tree.Focused then //如果结构树没有获得焦点
begin
if Message.WheelDelta > 0 then //如果是向上滚动
begin
pos:= bsSkinScrollBar1.Position - 20; //滚动的最小单位是5个象素
if pos < 0 then pos:= 0; //如果到达顶部
end else
begin //向下滚动
pos:= bsSkinScrollBar1.Position + 20;
if Pos > bsSkinScrollBar1.Max then //如果到达底部
Pos:= bsSkinScrollBar1.Max;
end;
bsSkinScrollBar1.Position:= pos; //设置滚动条的位置
end;
inherited; //分发给窗体上的子控件,以便其他控件可以处理滚动事件。
end;