unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, DB, ADODB, Grids, DBGrids, StdCtrls;

type
TDBGrid
=class(DBGrids.TDBGrid)
public
function DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint): Boolean; override;
end;

TForm1
= class(TForm)
DataSource1: TDataSource;
DBGrid1: TDBGrid;
ADOTable1: TADOTable;
Edit1: TEdit;
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}
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;


end.

相关文章:

  • 2022-12-23
  • 2021-12-22
  • 2021-10-27
  • 2021-06-18
  • 2021-08-23
  • 2022-12-23
  • 2021-07-01
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-01-25
  • 2021-10-01
  • 2021-10-18
  • 2021-12-22
  • 2022-02-10
相关资源
相似解决方案