RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomForm.VertScrollBar Property

Represents the vertical scroll bar for the scrolling windowed control.

Pascal
property VertScrollBar: TControlScrollBar;
C++
__property TControlScrollBar VertScrollBar;

Use VertScrollBar to hide, show, or manipulate the vertical scroll bar for the scrolling windowed control.  

C++ Examples: 

 

/*
The following example demonstrates form scrolling with the
PgUp and PgDn keys.
*/
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;
}

 

Delphi Examples: 

{
The following example demonstrates form scrolling with the
PgUp and PgDn keys.
}
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;

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!