Registriert seit: 23. Mai 2011
Ort: Görlitz
150 Beiträge
Delphi XE Starter
|
AW: TMemo mit dem mausrad scrollen ohne scrollbar?!
10. Aug 2013, 21:22
Delphi-Quellcode:
procedure TForm1.FormMouseWheel(Sender: TObject; Shift: TShiftState;
WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
var
I: Integer;
begin
Handled := PtInRect(memo1.ClientRect, memo1.ScreenToClient(MousePos));
if Handled then
for I := 1 to Mouse.WheelScrollLines do
try
if WheelDelta > 0 then
memo1.Perform(WM_VSCROLL, SB_LINEUP, 0)
else
memo1.Perform(WM_VSCROLL, SB_LINEDOWN, 0);
finally
memo1.Perform(WM_VSCROLL, SB_ENDSCROLL, 0);
end;
end;
|
|
Zitat
|