ScrollBarIncrement (C++)
Description
This example starts the form in a position scrolled so that the right edge shows:
Code
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
/* Set the width of the form window to display 300 pixels in the client area. */
ClientWidth = 300;
/* Now set the range to twice the client width.
This means that the form has a logical size
that is twice as big as the physical window.
Note that Range must always be at least as big as ClientWidth. */
HorzScrollBar->Range = 600;
/* Start the form fully scrolled. */
HorzScrollBar->Position = HorzScrollBar->Range - ClientWidth;
/* Clicking the scroll arrows moves the form 10 pixels. */
HorzScrollBar->Increment = 10;
HorzScrollBar->Visible = true; // Show the scroll bar.
}
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 )