Sign in Join
FPDoc Onlineexperiment

TCustomDBGrid.WMVScroll procedure

Member of TCustomDBGridprotectedIn unit DBGrids

Handles the LM_VScroll message for the control.

Declaration

pascal
procedure WMVScroll(var Message: TLMVScroll); message

Arguments

Message

Window message examined and handled in the method.

Description

WMVScroll is a method used to handle a LM_VScroll message for the control. It ensures that the dataset for control is repositioned for the window message. No actions are performed in the method if the DataLink for the control is not active.

WMVScroll checks the ScrollCode member in Message to determine the actions performed in the method. The following scroll code values are handled:

SB_TOP
Moves the dataset in DataLink to the first row.
SB_BOTTOM
Moves the dataset in DataLink to the last row.
SB_PAGEUP
Moves the dataset in DataLink towards the beginning of the file. VisibleRowCount contains the number of rows.
SB_LINEUP
Moves the dataset in DataLink towards the beginning of the file by one row.
SB_LINEDOWN
Moves the dataset in DataLink towards the end of the file by one row.
SB_PAGEDOWN
Moves the dataset in DataLink towards the end of the file. VisibleRowCount contains the number of rows.
SB_THUMBPOSITION
Repositions the dataset in DataLink when the thumb bar position for the control has been changed.
SB_THUMBTRACK
Repositions the dataset in DataLink when thumb bar tracking has been enabled in the Options for the control. No actions are performed if the dataset is not sequenced, the message has already been handled for the SB_THUMBPOSITION scroll message, or thumb bar tracking has not been enabled in options.

Other scroll code values in Message are ignored.

WMVScroll calls ScrollBarPosition to update the position for the vertical scroll bar on the control. If EditorMode is enabled, the private RestoreEditor method is called to toggle the value in EditorMode and redraw the editor control.

See also

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