Sign in Join
FPDoc Onlineexperiment

TScrollingWinControl.ScrollInView procedure

Member of TScrollingWinControlpublicIn unit Forms

Aligns the specified control to its parent and scrolls it into view.

Declaration

pascal
procedure ScrollInView(AControl: TControl)

Arguments

AControl

Control to make visible in the scrolling window control.

Description

ScrollInView is a method used to align and scroll the control in AControl into the visible area for the scrolling window control. No actions are performed in the method under the following conditions:

  • AControl has not been assigned (contains Nil).
  • The control is not the Parent (or ancestor) for AControl.
  • Neither horizontal nor vertical scroll bars are displayed for the control.

The origin for AControl relative to its Parent is determined by calling the ClientToParent method. OffsetRect (in Types) is called to apply the offset to the display rectangle for AControl. The adjusted coordinates are used to reposition the visible scroll bars so that AControl is visible in the client area for the scrolling window control.

See also

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