I tried this quickly, at least it compiles:
TStringGrid2 = class(TStringGrid)
protected
function DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint): Boolean; override;
end;
// ...
function TStringGrid2.DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint): Boolean;
begin
//Result:=inherited DoMouseWheel(Shift, WheelDelta, MousePos);
Result:=false;
end;
To insert a TStringGrid2 on form, you need to do a little more tricks. You can:
- Make it a new component.
- TStringGrid2.Create and set its properties manually.
- Draw a TStringGrid on form, and then change it to TStringGrid2. You may have to manually edit .lfm file.