A scrollable field can be used when the size of the field defined on the panel is smaller than the amount of data to be displayed. With the cursor placed in the field, the LEFT and RIGHT commands can be used to scroll the data displayed. In addition, the EXPAND command can be used to display the data in a popup window.
Here is the markup used for the Data Columns example (see Figure 1), modified to display the Name and Address fields as scrollable fields. The Name field is displayed with a separator scroll indicator and the Address field is displayed with a scale indicator. The conversion utility automatically generates the separator scroll indicator below the Name field and the scale indicator below the Address field.
<!doctype dm system>
<varclass name=sampcls type ='char 30'>
<varclass name=statcls type ='char 2'>
<varclass name=zipcls type ='char 5'>
<varclass name=char1cls type ='char 1'>
<varlist>
<vardcl name=name varclass=sampcls>
<vardcl name=addr varclass=sampcls>
<vardcl name=city varclass=sampcls>
<vardcl name=stat varclass=statcls>
<vardcl name=day varclass=char1cls>
<vardcl name=zipc varclass=zipcls>
</varlist>
<panel name=scr1xmp depth=24>Schedule Appointments
<topinst>Enter your name and address and
choose the most convenient day for your appointment.
<area>
<dtacol pmtwidth=12 entwidth=30 deswidth=29 selwidth=30>
<dtafld datavar=name>Name
<dtafldd>Last, First, M.I.
<scrfld displen=50 sindvar=namesi>
<dtafld datavar=addr>Address
<scrfld displen=80 scale=addrsi>
<dtafld datavar=city>City
<dtafld datavar=stat entwidth=2>State
<dtafldd>Use 2-character abbreviation
<dtafld datavar=zipc entwidth=5>Zip code
<divider type=solid gutter=3>
<selfld name=day pmtloc=before>Weekdays
<choice>Monday
<choice>Tuesday
<choice>Wednesday
<choice>Thursday
<choice>Friday
</selfld>
</dtacol>
</area>
</panel>
This is how the panel displays:
Schedule Appointments
Enter your name and address and choose the most convenient day for your
appointment.
Name . . . . Veryveryverylongsurname, Alexa Last, First, M.I.
----------------------------->
Address . . Apartment 52b, 446 Verylongstr
----+----1----+----2----+----3
City . . . .
State . . . Use 2-character abbreviation
Zip code . .
---------------------------------------------------------------------------
Weekdays . . 1. Monday
2. Tuesday
3. Wednesday
4. Thursday
5. Friday
Command ===> Scroll ===> CSR
F1=Help F2=Split F3=Exit F9=Swap F12=Cancel
When the scrollable field is defined using the LSTCOL tag the conversion utility automatically generates, along with the column heading, output fields for any scroll indicators you specify. Here is the markup used for the List Group Headings example (see Figure 1), modified to display the Appointment data in scrollable fields. This would allow more information than just the account name to be stored and displayed in the Appointment data. A scale indicator is displayed with the heading for each day's column.
<!doctype dm system>
<varclass name=timecls type='char 13'>
<varclass name=vc1 type ='char 9'>
<varlist>
<vardcl name=timecol varclass=timecls>
<vardcl name=moncol varclass=vc1>
<vardcl name=tuecol varclass=vc1>
<vardcl name=wedcol varclass=vc1>
<vardcl name=thrcol varclass=vc1>
<vardcl name=fricol varclass=vc1>
</varlist>
<panel name=scrxmp2>Scheduling Account Visits
<topinst>Enter the appointment details in the appropriate time slot.
<area>
<lstfld scrollvar=scrlamt scrvhelp=scrhelp>
<lstcol datavar=timecol usage=out colwidth=13>
<lstgrp headline=yes>Appointments
<lstcol datavar=moncol colwidth=9>Monday
<scrfld displen=30 scale=monscl>
<lstcol datavar=tuecol colwidth=9>Tuesday
<scrfld displen=30 scale=tuescl>
<lstcol datavar=wedcol colwidth=9>Wednesday
<scrfld displen=30 scale=wedscl>
<lstcol datavar=thrcol colwidth=9>Thursday
<scrfld displen=30 scale=thrscl>
<lstcol datavar=fricol colwidth=9>Friday
<scrfld displen=30 scale=friscl>
</lstgrp>
</lstfld>
</area>
<cmdarea>
</panel>
This is how the panel displays:
Scheduling Account Visits ROW 1 to 9 of 9
Enter the account name in the appropriate time slot.
--------------------- Appointments ----------------------
Monday Tuesday Wednesday Thursday Friday
----+---- ----+---- ----+---- ----+---- ----+----
08:00 - 08:59
09:00 - 09:59
10:00 - 10:59 Hart - Pl
11:00 - 11:59
12:00 - 12:59 Wife - lu
01:00 - 01:59 XYZ - rev ABC - upd
02:00 - 02:59
03:00 - 03:59
04:00 - 04:59 Rod - ten
***************************** Bottom of data *****************************
Command ===> Scroll ===> CSR
F1=Help F2=Split F3=Exit F9=Swap F12=Cancel