Permalink
Browse files

Support horizontal scrolling in grids with Alt+Mousewheel. Closes #142.

  • Loading branch information...
ansgarbecker committed Feb 18, 2018
1 parent 32bc533 commit 93bb6c6051b80c8775aec9783251132e48ac6fac
Showing with 5 additions and 0 deletions.
  1. +5 −0 source/main.pas
View
@@ -8726,6 +8726,7 @@ procedure TMainForm.AnyGridMouseWheel(Sender: TObject; Shift: TShiftState; Wheel
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 @@ procedure TMainForm.AnyGridMouseWheel(Sender: TObject; Shift: TShiftState; Wheel
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;

0 comments on commit 93bb6c6

Please sign in to comment.