Sign in Join
FPDoc Onlineexperiment

TCustomScrollBar.SetParams procedure

Member of TCustomScrollBarpublicIn unit StdCtrls

Updates the Min and Max values, the size of the page, and the position in the scrollbar.

Declaration

pascal
procedure SetParams(APosition: Integer; AMin: Integer; AMax: Integer; 
 APageSize: Integer)
procedure SetParams(APosition: Integer; AMin: Integer; AMax: Integer)

Arguments

APosition

Value applied to the scrollbar position.

AMin

Value applied to the scrollbar minimum value.

AMax

Value applied to the scrollbar maximum value.

APageSize

Value applied to the scrollbar page size.

Description

SetParams is an overloaded procedure used to update the values in the TScrollInfo structure passed to the widgetset class. Values passed in parameters are stored in the TScrollInfo instance, and used to validate the new settings for the scrollbar.

SetParams raises an EInvalidOperation exception if the value in AMax is smaller than the value in AMin.

The value in APosition is normalized to ensure that it is in the range specified by AMin and AMax.

APageSize is set to 0 (zero) if it contains a negative value.

When any of the parameter values differ from the current values in the class instance, the class instance is updated. SetScrollInfo is called to apply the changed values when a handle has been allocated for the control. SetScrollPos is called when APosition contains a value different than the one in the class instance. The Change method is called to process the updated values in the control and signal the OnChange event handler (when assigned). The SetParams method in the widgetset class is called to synchronize the changes.

SetParams is called when a new value is assigned to the Position, Min, Max, or PageSize property.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.