14.12.2016, 18:02
|
|
Let Me Show You
|
|
Регистрация: 30.04.2010
Адрес: Северодвинск
Сообщения: 5,426
Версия Delphi: 7, XE5
Репутация: 59586
|
|
Код:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Mask, DBCtrls, dbcgrids, DB, DBTables;
type
TDBCtrlGrid = class(DBCGrids.TDBCtrlGrid)
protected
function DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint): Boolean; override;
end;
TForm1 = class(TForm)
DBCtrlGrid1: TDBCtrlGrid;
DBEdit1: TDBEdit;
DBEdit2: TDBEdit;
Table1: TTable;
DataSource1: TDataSource;
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
{ TDBCtrlGrid }
function TDBCtrlGrid.DoMouseWheel(Shift: TShiftState; WheelDelta: Integer;
MousePos: TPoint): Boolean;
begin
if WheelDelta>0 then DataSource.DataSet.Prior else DataSource.DataSet.Next;
Result:=True;
end;
end.
__________________
Пишу программы за еду.
__________________
|