Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

TppViewer Scroll

edited December 2009 in General
Hello I use the TppViewer, and I was wondering
if there is a way to scroll it using the mouse wheel.

Thanks in advance.

Abel

Comments

  • edited December 2009
    Hi Abel,

    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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.