Generic Function | Package: cg | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 9.0 Unrevised from 8.2 to 9.0. 8.2 version

## section-scrolled

Arguments: grid-section new-scroll-pos old-scroll-pos max-scroll-pos

This generic function is called whenever a grid-section is scrolled, either interactively with the mouse or keyboard or programmatically by calling scroll-section. The default method does nothing, but applications may add section-scrolled methods if they need to know when grid scrolling occurs.

For example, an application could note when a grid-section has been scrolled to the end, and add new subsections at that time. Or it could compare the new-scroll-pos to the edge-position and section-size properties of the section's rows or columns to determine which rows or columns are now visible.

section-scrolled is not called when the grid is being created. Nor is it called if the application calls scroll-section with a new scroll position that is equal to the current scroll position of the section.

section-scrolled is called with the follwing arguments:

- grid-section is the `grid-row-section` or `grid-column-section` that was scrolled.
- new-scroll-pos is a non-negative integer indicating how far the section is now scrolled from its leftmost (for a `grid-column-section`) or topmost (for a `grid-row-section`) scroll position, in pixels.
- old-scroll-pos is a non-negative integer indicating the scroll position just before the most recent scrolling movement. Note that if the user drags the scroll gadget, section-scrolled is called multiple times to reflect the multiple redisplays that are done to effect smooth scrolling, with old-scroll-pos being equal each time to the value of new-scroll-pos from the previous call.
- max-scroll-pos is a non-negative integer indicating the scroll position when the section is scrolled all the way to the right or the bottom. There is no min-scroll-position argument because the minimum scroll position of a grid-section is always zero.

scroll-position can alternately be called on a grid-section to find its current scroll position at any time.

Copyright (c) 1998-2019, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 8.2 page.
Created 2012.5.30.

|  | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 9.0 Unrevised from 8.2 to 9.0. 8.2 version