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

ppViewer: Is there a way to "force" a scroll based on a key stroke?

edited February 2002 in General
When using a ppViewer in a form, is there a way to "force" a scroll based on
a key stroke? When the user presses PgDn or PgUp nothing happens. Nor do
Down or Up down anything?

Thanks.

--

Andrew Shinn
High Meadow Business Solutions
andys@highmeadow.com

Comments

  • edited February 2002
    Hi Andrew,

    try Ctrl + PgDn or Ctrl + PgUp!

    Robbi
  • edited February 2002
    Try adding something like the following (keys your choice) to the ppViewer
    form

    procedure TCustPreviewForm.FormKeyDown(Sender: TObject; var Key: Word;
    Shift: TShiftState);
    begin
    with ppViewer1 do begin
    case Key of
    VK_PRIOR, VK_UP: Scroll(dtUp);
    VK_NEXT, VK_DOWN: Scroll(dtDown);
    VK_HOME: begin
    ScrollBox.HorzScrollBar.position := 0;
    ScrollBox.VertScrollbar.position := 0;
    end;
    VK_END: begin
    with ScrollBox.HorzScrollBar do position := range;
    with ScrollBox.VertScrollbar do position := range;
    end;
    VK_LEFT: Scroll(dtLeft);
    VK_RIGHT: Scroll(dtRight);
    end;
    end;

    end;
This discussion has been closed.