[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Grids' (#lcl)

TCustomGrid.ScrollBarPosition

Sets the position for the specified scroll bar to the given value.

Declaration

Source position: grids.pas line 1177

protected procedure TCustomGrid.ScrollBarPosition(

  Which: Integer;

  Value: Integer

);

Arguments

Which

  

Scroll bar updated in the method.

Value

  

New position for the scroll bar.

Description

ScrollBarPosition is a method used to set position for the scroll bar specified in Which to the new Value.

Which contains either SB_Horz or SB_Vert, and identifies the scroll bar affected in the method.

Value contains the new position for the scroll bar.

ScrollBarPosition uses the SetScrollInfo routine to update the scroll bar position. It allocates the TScrollInfo structure and stores Value as the scroll bar position in the structure.

ScrollBarPosition calls ScrollBarIsVisible to determine if the scroll bar in Which is visible. The visibility is used when calling SetScrollInfo.

No actions are performed in the method if the Handle has not been allocated for the grid control.

See also

TCustomGrid.ScrollBarPage

  

Updates the page size for the specified scroll bar.

TCustomGrid.ScrollBarRange

  

Sets range information for the specified scroll bar.


Version 4.0 Generated 2025-05-03 Home