From 93bb6c6051b80c8775aec9783251132e48ac6fac Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Sun, 18 Feb 2018 11:52:01 +0100 Subject: [PATCH] Support horizontal scrolling in grids with Alt+Mousewheel. Closes #142. --- source/main.pas | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/main.pas b/source/main.pas index 94dfcc8f..3acb6c0c 100644 --- a/source/main.pas +++ b/source/main.pas @@ -8726,6 +8726,7 @@ var begin // Advance to next or previous grid node on Shift+MouseWheel VT := Sender as TVirtualStringTree; + // TODO: why not use "ssShift in Shift" instead? if KeyPressed(VK_SHIFT) then begin if Assigned(VT.FocusedNode) then begin if WheelDelta > 0 then @@ -8747,6 +8748,10 @@ begin AppSettings.ResetPath; AppSettings.WriteInt(asDataFontSize, NewFontSize); ApplyFontToGrids; + end else if ssAlt in Shift then begin + // Horizontal scrolling with Alt+Mousewheel + VT.OffsetX := VT.OffsetX + WheelDelta; + Handled := True; end; end;