Sign in Join
FPDoc Onlineexperiment

TCustomGrid.UpdateHorzScrollBar procedure

Member of TCustomGridprotectedIn unit Grids

Updates the horizontal scroll bar to use the specified range, page, and position.

Declaration

pascal
procedure UpdateHorzScrollBar(const aVisible: Boolean; 
 const aRange: Integer; 
 const aPage: Integer; const aPos: Integer)
 ; virtual

Arguments

aVisibleTrue if the scroll bar is visible.
aRange

Maximum position for the scroll bar.

aPage

Page size for a thumb tab in the scroll bar.

aPos

Position for the scroll bar.

Description

UpdateHorzScrollBar calls ScrollBarShow to update the scroll bar visibility when it differs from the value in aVisible. The ScrollBarRange method is called to apply the values in the ARange, APage, and APos arguments to the horizontal scroll bar for the control.

The scroll bar range is not updated if the scroll bar visibility has not been changed or if the scroll bar is not visible. For the Darwin platform, ScrollBarRange is always called - regardless of visibility; overlay-style scroll bars on macOS require the latest range, page, and position values.

UpdateHorzScrollBar is called from the CalcScrollbarsRange method when the visible area in the grid is scrolled.

See also

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