TGrid控件怎么编写拖动垂直滚动条事件 仁兄: 当Grid中的数据超过本身显示的范围,会出现垂直滚动条,拖动垂直滚动条时将触发什么事件,而且怎么编写代码来实现拖动时时时在Grid中指针的定位 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, Grids, DBGrids, ComCtrls, ExtCtrls, Buttons, jpeg; type TDBGrid= class(DBGrids.TDBGrid); public function DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint): Boolean; override; end;type TGrid = class(TDBGrid);...........implementation..function TDBGrid.DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint): Boolean;begin if WheelDelta < 0 then Datasource.DataSet.Next; if wheelDelta > 0 then DataSource.DataSet.Prior;end; 一个看似简单的问题 问一个关于StringGrid的问题?特急! 如何重新编译VCL单元文件??? 高分求杨勇写的snpack2.25版for delphi6 如何直接将LISTVIEW中的内容打印出来! 在服务中打开可执行文件显示 急!急!急! 应用服务器为何总是死掉 登陆界面问题 请问为什么TListView中的OnDrawItem(...)不被执行? SQl Server:如何将 目前传奇2盗号程序原代码解析篇(价值800买的不要骂我) 小女子问简单问题,急,达人乱入,先拜谢了。。。
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Grids, DBGrids, ComCtrls, ExtCtrls, Buttons, jpeg;
type
TDBGrid= class(DBGrids.TDBGrid);
public
function DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint): Boolean; override;
end;
type
TGrid = class(TDBGrid);
...........
implementation
..
function TDBGrid.DoMouseWheel(Shift: TShiftState;
WheelDelta: Integer; MousePos: TPoint): Boolean;
begin
if WheelDelta < 0 then
Datasource.DataSet.Next;
if wheelDelta > 0 then
DataSource.DataSet.Prior;
end;