FunctionPackage: cgToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
Unrevised from 8.1 to 8.2.
8.1 version

scroll-section

Arguments: grid-widget grid-section scroll-pos

This function scrolls a grid-section programmatically. The arguments are:

To scroll a grid-row to the top of a grid-row-section or a grid-column to the left of a grid-column-section, pass the edge-position of the row or column to scroll-section.

The following example may be run when the "Employee Information" window still exists after running the "Employee Chart" example on the Examples tab of the Navigator dialog. This code will find that example grid and scroll its "main" column section programmatically. First the section will scroll to its beginning (with the "Full Time?" column left-aligned), then scroll explicitly to the "Inspect" column, and then scroll to the end of the section. This is done four times, waiting a second at each scroll position.

(let* ((window (find-window :employee-chart))
       grid column-section inspect-column-position)
  (unless window
    (error "Couldn't find the Employee Information example window.  ~
            Run the Employee Chart example and try again."))
  (select-window window)
  (setq grid (find-component :employee-grid window))
  (setq column-section (column-section grid :worksheet))
  (setq inspect-column-position (edge-position
                                 (subsection column-section :inspect)))
  (dotimes (j 4)
    (scroll-section grid column-section 0)
    (sleep 1)
    (scroll-section grid column-section inspect-column-position)
    (sleep 1)
    (scroll-section grid column-section most-positive-fixnum)
    (sleep 1)))

See section-scrolled on how to be notified whenever a grid-section is scrolled either programmatically or interactively.


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

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
Unrevised from 8.1 to 8.2.
8.1 version