Creating a Scrolling Window

A scrolling window creates a "pick list" that accesses the values in a single field of all the records in a specified database, or displays lines of text provided by a user written V+ routine.

To create a new scrolling window, display the menu page you want to create a scrolling window for and select:

Utilities -> Edit Menu -> New -> Scrolling Window

To edit an existing scrolling window, display the menu page the scrolling window is on and select:

Scrolling Windows Options

1

Select the font number for the label on the scroll window.

2

Indicate the conditional section you want associated with this scroll window. Conditional sections are discussed in Creating a Conditional Section.

3

The upper left corner of the scroll window is specified in the first two boxes. The width and height of the scroll window are specified in the second two boxes.

Enter the help search string associated with this item. When this item is selected and the F1 key is pressed, the help database associated with the menu page file will be searched for a record with this name. If a matching record is found, it will be displayed in the help window (see Custom Online Help).

4

 Enter the label you want to display with the scroll window. In the "Relative position" data boxes, enter the position for this label relative to the upper left corner of the scroll window.

Double click on Aa|Aa (next to Text color) to display a pop-up menu showing you the text and background color options. If Opaque is selected, the text will look like the left "Aa", otherwise it will look like the right "Aa".

If Opaque is selected, the background of the label will be gray.

5

The source for the scrolling window text can be a database or a V+ routine.

If DB index is selected, enter the database type number (enter 0 to use the default primary database), the field number to access in the database, and the array index (if any) within the field. The field values of the records in the specified database will be displayed in the scrolling window. When a line in the scrolling window is clicked, the V+ routine specified in Routine will execute. The number of the double clicked line will be passed to the routine.

If Sequence idle is selected, this scroll window will not be active during runtime task execution.

Access level specifies the user level required before this menu item will be active.

If Only show records with unique text is selected, multiple instances of the same value in successive records will be suppressed. (This option is available only when DB index is selected.)

If Auto redraw is selected, conditionals will be evaluated and the page redrawn each time the value is changed.

If V+ Routine is selected, enter a V+ routine name in the Routine field. The V+ routine must supply the lines of text for the scrolling window, and indicate what should be done when a line is double clicked on. (The calling requirements for a scrolling window routine are described in the next section.) The value in "Arg" will be passed to that routine (see menu.scr.spawn (arg, mode, db.p, line, n.line, $line, $cmd)( )).

 

6

Indicate whether you want a vertical slide bar on the scrolling window and whether you want the selected item in the scrolling window to be highlighted.

V+ Scrolling Window Routines

The scrolling window routine performs the following functions:

  1. When the scrolling window is first drawn, the menu driver calls the routine. The routine should return the total number of lines of text that will be supplied.

  2. When the scrolling window is first drawn, and each time the window is scrolled, the routine should supply the lines of text. The routine will be called once for each line of text.

  3. Each time a line of text is highlighted in the scrolling window, this routine will be notified of the selected line.

  4. When the user double clicks on a line of text, or a Go -> Goto menu selection is made, the routine will be notified and should take appropriate action.

The calling sequence for the routine is detailed in Descriptions of Menu Spawn Routines (see AIM Menu Page Routines).