TDBCtrlGrid
does not react to the mouse wheel at all.
I tried this:
procedure TForm1.FormMouseWheel(Sender: TObject;
Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint;
var Handled: Boolean);
begin
if DBCtrlGrid1.ClientRect.Contains(DBCtrlGrid1.ScreenToClient(MousePos)) then
begin
DBCtrlGrid1.ScrollBy(0, WheelDelta);
Handled := True;
end;
end;
The control grid now scrolls, but it does not change the position in the DataSet, but instead moves its content out of the client rect which looks pretty ugly.
How do I enable mouse wheel scrolling on a TDBCtrlGrid
?