hip !
i mod TscrollBox ancestor(TScrollingWinControl), because many less code than if i mod only Tscrollbox.
Tform is a descendant of TScrollingWinControl, it gain the event, the more useful thing i never see

.
this works for me on windows 11, fedora 44, hope for you too.
i got help from these posts :
https://forum.lazarus.freepascal.org/index.php?topic=28556.0 https://forum.lazarus.freepascal.org/index.php?topic=31550.0 In forms.pp :
{ TScrollingWinControl }
TScrollEvent = procedure(Sender: TObject; var ScrollPos: Integer) of object; {onscroll}
TScrollingWinControl = class(TCustomControl)
strict private {onscroll}
FOnVScroll: TScrollEvent; {onscroll}
FOnHScroll: TScrollEvent; {onscroll}
published
property OnVScroll: TScrollEvent read FOnVScroll write FOnVScroll; {onscroll}
property OnHScroll: TScrollEvent read FOnHScroll write FOnHScroll; {onscroll}
in scrollingwincontrol.inc :
procedure TScrollingWinControl.WMVScroll(var Message : TLMVScroll);
begin
VertScrollbar.ScrollHandler(Message);
if Assigned(FOnVScroll) then
FOnVScroll(Self, FVertScrollBar.FPosition);{onscroll}
end;
procedure TScrollingWinControl.WMHScroll(var Message : TLMHScroll);
begin
//DebugLn(['TScrollingWinControl.WMHScroll ',dbgsName(Self)]);
HorzScrollbar.ScrollHandler(Message);
if Assigned(FOnHScroll) then
FOnHScroll(Self, FHorzScrollBar.FPosition);{onscroll}
end;