[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
Scrolls the grid origin by the specified relative amounts.
Source position: grids.pas line 1204
protected function TCustomGrid.TrySmoothScrollBy( |
aColDelta: Integer; |
aRowDelta: Integer |
):Boolean; |
aColDelta |
|
Indicates the direction and number of pixels for a horizontal scroll request. |
aRowDelta |
|
Indicates the direction and number of pixels for a vertical scroll request. |
True on successful completion of the scroll operation.
TrySmoothScrollBy is an Integer function used to scroll the grid control by the specified horizontal and vertical amounts (Deltas). TrySmoothScrollBy ensures that the internal cache for the control is updated to reflect the visible area for the control after the scroll operation.
TrySmoothScrollBy is called from methods that handle scroll bar or the event handler for mouse wheel messages, and occurs when the user interacts with the the grid control. For example: WMHScroll, WMVScroll, and GridMouseWheel. In is not intended for use in end-user code - but it's not expressly forbidden either.
AColDelta and ARowDelta contain the number of pixels that the control content should be scrolled in the horizontal and vertical directions. Positive values indicate that the content should scroll towards the right or bottom of the control. Negative values indicate that the content should scroll towards the left or top of the control.
No actions are performed in the method when both AColDelta and ARowDelta are set to 0 (zero).
TrySmoothScrollBy uses the coordinates for the visible cell at the top and left coordinates on the control for the scroll operation. It also uses values in ColWidths and RowHeights to determine when a cells become visible (or hidden) on the control canvas and in its cache. When goScrollKeepVisible has been included in Options, the selection on the control is extended to include the scrolled area. The ScrollBy method is called using the calculated X and Y offsets for the new top and left coordinates on the control.
The return value is True if the scroll operation was successfully completed in the method. The return value is False if the operation failed due to cell that is too tall or too wide for the requested scroll value(s). This can occur when goSmoothScroll is not included in the grid Options.
Modified in LCL version 4.0 to have protected visibility.
|
Provides indexed access to the Width for a column in the grid. |
|
|
Contains cached data about the visual layout and state for the grid control. |
|
|
Gets a TPoint instance with the top and left coordinates for the first visible, non-fixed row in the grid control. |
|
|
Gets the smooth scroll setting in the Options for the grid. |
|
|
Performs actions to apply a mouse wheel message to the grid control. |
|
|
Moves to the next selectable cell in the specified direction. |
|
|
Contains the set of optional features and/or behaviors enabled for the grid control. |
|
|
Provides indexed access to the height for each row in the grid. |
|
|
Scrolls the non-fixed area for the control by the specified delta values. |
|
|
Signals the OnTopLeftChanged event handler (when assigned) at run-time. |
|
|
Performs actions when the mouse wheel is scrolled in the grid control. |
|
|
Represents grid option values available for grid controls. |
Version 4.0 | Generated 2025-05-03 | Home |