If you register your own previewer, you can add code something like:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ procedure TmyPrintPreview.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); begin // see Win32.Hlp for information on VK_ constants. if (ssCtrl in Shift) then begin case Key of VK_PRIOR: ppViewer1.PriorPage; VK_NEXT: ppViewer1.NextPage; VK_HOME: ppViewer1.FirstPage; VK_END: ppViewer1.LastPage; end; end else begin case Key of VK_NEXT: ppViewer1.ScrollBox.VertScrollBar.position := ppViewer1.ScrollBox.VertScrollBar.position + 450; VK_PRIOR: ppViewer1.ScrollBox.VertScrollBar.position := ppViewer1.ScrollBox.VertScrollBar.position - 450; VK_DOWN: ppViewer1.ScrollBox.VertScrollBar.position := ppViewer1.ScrollBox.VertScrollBar.position + 10; VK_UP: ppViewer1.ScrollBox.VertScrollBar.position := ppViewer1.ScrollBox.VertScrollBar.position - 10; end; end; end; {procedure, FormKeyDown} ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HTH Jon
Comments
like:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
procedure TmyPrintPreview.FormKeyDown(Sender: TObject;
var Key: Word; Shift: TShiftState);
begin
// see Win32.Hlp for information on VK_ constants.
if (ssCtrl in Shift) then begin
case Key of
VK_PRIOR: ppViewer1.PriorPage;
VK_NEXT: ppViewer1.NextPage;
VK_HOME: ppViewer1.FirstPage;
VK_END: ppViewer1.LastPage;
end;
end
else begin
case Key of
VK_NEXT: ppViewer1.ScrollBox.VertScrollBar.position :=
ppViewer1.ScrollBox.VertScrollBar.position + 450;
VK_PRIOR: ppViewer1.ScrollBox.VertScrollBar.position :=
ppViewer1.ScrollBox.VertScrollBar.position - 450;
VK_DOWN: ppViewer1.ScrollBox.VertScrollBar.position :=
ppViewer1.ScrollBox.VertScrollBar.position + 10;
VK_UP: ppViewer1.ScrollBox.VertScrollBar.position :=
ppViewer1.ScrollBox.VertScrollBar.position - 10;
end;
end;
end; {procedure, FormKeyDown}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HTH
Jon