Hotspots are special areas of an output list. If the user clicks once onto a hotspot field, an event is triggered (for example, AT LINE-SELECTION ). For fields that are not defined as hotspots, the user must double-click the field or use a function key to trigger an event. For information on events during list processing, see Interactive Lists .
To output areas as hotspots, use the following option of the FORMAT statement:
FORMAT HOTSPOT [ON|OFF].
To designate fields as hotspots at runtime, use:
FORMAT HOTSPOT = h .
The ON option (or h unequal to zero) formats subsequent output as hotspot. If the user moves the mouse to such a field, the mouse pointer changes to a hand with pointed index finger. As long as this hand is visible, a single click triggers an event. In addition to the changed mouse pointer, you may want to use a different color to mark the hotspot.
You cannot use the HOTSPOT option if INPUT ON is set, since with HOTSPOT ON the cursor cannot be positioned on an input field. In addition, you cannot format horizontal lines created with ULINE and blank lines created with SKIP as hotspots.
REPORT demo_list_format_hotspot. INCLUDE list. START-OF-SELECTION. WRITE 'Now comes a'. FORMAT HOTSPOT ON COLOR 5 INVERSE ON. WRITE 'HOTSPOT'. FORMAT HOTSPOT OFF COLOR OFF. AT LINE-SELECTION. WRITE / 'New list AT-LINE-SELECTION'. SKIP. WRITE 'This is also a hotspot:'. WRITE icon_list AS ICON HOTSPOT.
In this program, part of the first line is formatted as hotspot in the START-OF-SELECTION event. The standard page header is defined as a text element. If the user moves the mouse over the word HOTSPOT in the output, the mouse pointer changes to a hand:
A single click triggers the AT-LINE-SELECTION event. At this event, the program creates a secondary list containing another hotspot. The hotspot in the secondary list is an icon:
For information on the AT-LINE-SELECTION event and on secondary lists, see Interactive Lists .