VertScrollBar (C++)

From RAD Studio Code Examples
Jump to: navigation, search

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