ScrollBarIncrement (Delphi)
Description
This example starts the form in a position scrolled so that the right hand edge shows.
Code
procedure TForm1.FormCreate(Sender: TObject);
begin
ClientWidth := 300;
with HorzScrollBar do
begin
{ Set the range to twice the ClientWidth of the form. }
{ This means that the form's logical size is twice as big }
{ as the physical window. }
{ Note that Range must always be larger than the ClientWidth. }
Range := 600;
Position := Range - ClientWidth; { Start form out fully scrolled. }
Increment := 10; { Clicking the scroll arrows moves the form 10 pixels. }
Visible := True; { Show the scrollbar. }
end;
end;
Uses
- 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.Forms.TCustomForm.ClientWidth ( fr | de | ja )
- Vcl.Forms.TScrollingWinControl.HorzScrollBar ( fr | de | ja )