Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions Source/ide/simba.form_output.pas
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down