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

TControlScrollBar.UpdateScrollBar

Updates the state and position for the scroll bar in the associated Control.

Declaration

Source position: forms.pp line 127

protected procedure TControlScrollBar.UpdateScrollBar; virtual;

Description

UpdateScrollBar is a procedure used to update the state and position for the scroll bar in the associated Control.

When Control is a TScrollingWinControl instance, TScrollInfo is captured using the Range, Position, and Page properties. The scroll bar information is applied to the associated control by calling SetScrollInfo.

Remark: TScrollInfo values are not applied when a handle has not been allocated for the control, or when Control is not a TScrollingWinControl class instance.

UpdateScrollBar calls SetPosition to apply the current value in Position to a visible scroll bar in the class instance. When Control is a TScrollingWinControl instance, the Smooth property is used to determine if Increment needs to be adjusted to a value that is 10% of the Page size for the control.

UpdateScrollBar is used in the implementation of the ControlUpdateScrollBars method.

See also

TControlScrollBar.Increment

  

The small Position increment, applicable to the scroll bar arrows.

TControlScrollBar.Page

  

The slider size, position increment applicable to the scroll bar area beneath the slider.

TControlScrollBar.Smooth

  

Enables smooth scrolling, with automatic adjustment of Increment and Page.

TControlScrollBar.Range

  

The virtual size of the Parent Control.

TControlScrollBar.ControlUpdateScrollBars

  

Forces the associated control to update its scroll bars.