[Lazarus] ScrollBox - How to get proper scrolling for a TPanel?
Gabor Boros
gaborboros at yahoo.com
Thu Jan 7 18:31:47 CET 2016
2016.01.06. 23:40 keltezéssel, Michael W. Vogel írta:
> I've a similar problem, so I made a little test, but it is imho not the
> best solution (I have some flickering, but it works on Windows(7) ).
Michael, Sandro,
Now I have a component level solution which work for me.
function TMyPanel.DoMouseWheel(Shift: TShiftState; WheelDelta: Integer;
MousePos: TPoint): Boolean;
begin
Result:=inherited DoMouseWheel(Shift,WheelDelta,MousePos);
if (Parent is TScrollBox) then
begin
if (WheelDelta<0) then Parent.Perform(LM_VSCROLL,1,0) else
if (WheelDelta>0) then Parent.Perform(LM_VSCROLL,0,0);
end;
end;
Gabor
More information about the Lazarus
mailing list