15. VIFRED Field Specifications : Required and Other Attributes : Scrollable Field
 
Share this page                  
Scrollable Field
In a scrollable field, only part of the data in a text field is displayed on a form. The visible display window of a scrollable field is narrower than the underlying field. VIFRED truncates the display to show only as many characters that fit in the window. Access the entire field by scrolling horizontally with the left and right arrow keys, or, if you are entering data, by continuing to type in data beyond the end of the field.
Scrollable fields allow large amounts of data to be displayed in a small area of a form. Only fields that have a data type of varchar, char, text, or c with single‑row, non‑justified display formats can be designated as scrollable fields.
You can use the Attributes operation to make a field scrollable. You must create the form and fields first with the Create operation, which establishes the size of the display window. And then, access the Edit Attributes frame to assign the width of the underlying field.
To create a scrollable field on a form
1. Use the Create operation to create a form with a text field, single line, with no justification. On the field you want to make scrollable, enter the text data type and character size; for example, 5.
2. Select End.
You have established that this is a text field and the size of the display window of the scrollable field.
3. Select the Edit and then the Attributes operation, for a simple field, or the EditAttr operation for a table field in a column.
The Edit Attributes frame appears. For more information on these frames, see the preceding two figures.
The field, Scrollable?(y/n), appears at the bottom.
4. Enter y (yes) to indicate that this is a scrollable field.
The field, Scroll size, appears.
5. Type in the number of characters in the scrolling size or underlying width of the field—for example, 20.
The display window of the resulting scrollable field shows five characters, while the underlying field contains 20 characters.
You can change an existing scrollable field to a non‑scrollable field at this point by changing the value of the Scrollable(y/n) field to n.
You can also change a scrollable field to a non‑scrollable field at this point by changing the data type to a non‑text type, as scrollable fields must be text fields.
You can apply other field attributes at any point in this process. A scrollable field can have any other attribute except NoEcho.
It is not recommend that you make a scrollable field DisplayOnly, because the end user can only read the first section of the data that is displayed in the window, and cannot access the rest of the information in the field. The only exception to this is when all of the columns in a table field are unreachable due to being DisplayOnly or QueryOnly. The end user can then place the cursor on the fields in the first column, whether it is scrollable, and scroll up and down, thus accessing all the rows in this column.