The Preview and Designer windows already contain mousewheel support. If you would like to add it to the TppViewer on a form, you will need to implement the MouseWheel event of the form. Something like the following (similar to the way we do it for the previewer).
procedure TForm1.FormMouseWheel(Sender: TObject; Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean); begin ppViewer1.ScrollBox.VertScrollBar.Position := ppViewer1.ScrollBox.VertScrollBar.Position - (WheelDelta div 5);
Comments
The Preview and Designer windows already contain mousewheel support. If you
would like to add it to the TppViewer on a form, you will need to implement
the MouseWheel event of the form. Something like the following (similar to
the way we do it for the previewer).
procedure TForm1.FormMouseWheel(Sender: TObject; Shift: TShiftState;
WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean);
begin
ppViewer1.ScrollBox.VertScrollBar.Position :=
ppViewer1.ScrollBox.VertScrollBar.Position - (WheelDelta div 5);
end;
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com