VertScrollBar (C++)
Description
The following example demonstrates form scrolling with the PgUp and PgDn keys.
Code
void __fastcall TForm1::FormKeyDown(TObject *Sender, WORD &Key,
TShiftState Shift)
{
const int iPageDelta = 10;
if (Key == VK_NEXT)
VertScrollBar->Position += iPageDelta;
else if (Key == VK_PRIOR)
VertScrollBar->Position -= iPageDelta;
}
Uses
- Vcl.Forms.TScrollingWinControl.VertScrollBar ( fr | de | ja )
- Vcl.Forms.TControlScrollBar.Increment ( fr | de | ja )
- Vcl.Forms.TControlScrollBar.Position ( fr | de | ja )
- Vcl.Forms.TControlScrollBar.Range ( fr | de | ja )
- Vcl.Forms.TControlScrollBar.Visible ( fr | de | ja )
- Vcl.Controls.TControl.ClientHeight ( fr | de | ja )