From 013f037fc4381e7752239a5178efd16875ee42b7 Mon Sep 17 00:00:00 2001 From: Rico <97664519+Rico-Rodriguez@users.noreply.github.com> Date: Sat, 14 Feb 2026 11:13:35 -1000 Subject: [PATCH] Add DoMouseWheel method for horizontal scrolling Implement mouse wheel scrolling functionality for horizontal scrollbar. --- Source/ide/simba.form_output.pas | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Source/ide/simba.form_output.pas b/Source/ide/simba.form_output.pas index 77f40a222..45ec05d94 100644 --- a/Source/ide/simba.form_output.pas +++ b/Source/ide/simba.form_output.pas @@ -42,6 +42,8 @@ TSimbaOutputBox = class(TSimbaMemo) procedure DoAllowMouseLink(Sender: TObject; X, Y: Integer; var AllowMouseLink: Boolean); procedure DoMouseLinkClick(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); + function DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint): Boolean; override; + function GetTabTitle: String; function GetTabImageIndex: Integer; procedure SetTabTitle(Value: String); @@ -274,6 +276,22 @@ procedure TSimbaOutputBox.DoMouseLinkClick(Sender: TObject; Button: TMouseButton Application.QueueAsyncCall(@DoOpenLink, 0); end; +function TSimbaOutputBox.DoMouseWheel(Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint): Boolean; +const + SCROLL_AMOUNT = 5; +begin + if (ssShift in Shift) then + begin + if (WheelDelta > 0) then + FScrollbarHorz.Position := FScrollbarHorz.Position - SCROLL_AMOUNT + else + FScrollbarHorz.Position := FScrollbarHorz.Position + SCROLL_AMOUNT; + + Result := True; + end else + Result := inherited DoMouseWheel(Shift, WheelDelta, MousePos); +end; + constructor TSimbaOutputBox.Create(AOwner: TComponent); begin inherited Create(AOwner, False);