You can also check whether the
Shift argument contains the value
ssCtrl:
procedure TForm1.ListView1MouseWheelDown(Sender: TObject; Shift: TShiftState; MousePos: TPoint; var Handled: Boolean);
begin
if ssCtrl in Shift
then ListView1.ScrollBars := ssNone
else ListView1.ScrollBars := ssBoth;
end;
Only... for me, by default, pressing the
Ctrl key blocks scrolling (vertical) in the view list (Windows 8.1 64-bit, Lazarus 3.2). So what is this question really about?