Delphi .NET (2) Database (71) Delphi IDE (89) Network (39) Printing (3) Strings (12) VCL (83) Windows with Delphi (280)
Exchange Links About this site Links to us 
|
Scroll your form with PgUp and PgDn
This article has not been rated yet. After reading, feel free to leave comments and rate it.
Form scrolling is accomplished by modifying the VertScrollbar or HorzScrollbar position properties of the
form.
The following code demonstrates how to do this:
 | |  | | procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
const
PageDelta = 10;
begin
with VertScrollbar do
if Key = VK_NEXT then
Position := Position + PageDelta
else if Key = VK_PRIOR then
Position := Position - PageDelta;
end; | |  | |  | You don't like the formatting? Check out SourceCoder then!
Comments:
|