File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,6 +42,8 @@ TSimbaOutputBox = class(TSimbaMemo)
4242 procedure DoAllowMouseLink (Sender: TObject; X, Y: Integer; var AllowMouseLink: Boolean);
4343 procedure DoMouseLinkClick (Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
4444
45+ function DoMouseWheel (Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint): Boolean; override;
46+
4547 function GetTabTitle : String;
4648 function GetTabImageIndex : Integer;
4749 procedure SetTabTitle (Value : String);
@@ -274,6 +276,22 @@ procedure TSimbaOutputBox.DoMouseLinkClick(Sender: TObject; Button: TMouseButton
274276 Application.QueueAsyncCall(@DoOpenLink, 0 );
275277end ;
276278
279+ function TSimbaOutputBox.DoMouseWheel (Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint): Boolean;
280+ const
281+ SCROLL_AMOUNT = 5 ;
282+ begin
283+ if (ssShift in Shift) then
284+ begin
285+ if (WheelDelta > 0 ) then
286+ FScrollbarHorz.Position := FScrollbarHorz.Position - SCROLL_AMOUNT
287+ else
288+ FScrollbarHorz.Position := FScrollbarHorz.Position + SCROLL_AMOUNT;
289+
290+ Result := True;
291+ end else
292+ Result := inherited DoMouseWheel(Shift, WheelDelta, MousePos);
293+ end ;
294+
277295constructor TSimbaOutputBox.Create(AOwner: TComponent);
278296begin
279297 inherited Create(AOwner, False);
You can’t perform that action at this time.
0 commit comments