Was this helpful?
Viewports
A viewport provides a window on the form for viewing a larger field. The end user uses the viewport's scroll bars to view undisplayed portions of the field in the viewport. A viewport can contain one field of any type.
Using a viewport lets you add a field to a form that would not otherwise fit in a specified area. Viewports are most often used for images or subforms because you can set the height and width of the work area (inner rectangle) of a viewport.
Create a Viewport
You can create a new viewport and place fields in it, or you can select an existing single field, composite field, or a set of fields. Workbench automatically creates a flexible form that contains the fields you have selected. The viewport then contains a single composite field, the new flexible form field.
To create a new viewport
1. Open your frame in the Frame Editor (see Open an Existing Frame).
2. Click Insert, Field, Viewport Field.
3. Position and size the field on the form.
4. Set the properties for the viewport.
Note:  For complete descriptions of each field property, see Viewport Properties and Common Field Properties.
5. Add fields to the viewport.
To create a viewport for an existing image field
1. Open your frame in the Frame Editor (see Open an Existing Frame).
2. Select the image field.
Note:  For information about selecting fields, see How You Can Select Fields.
3. Click Group, Viewport.
The image field is then enclosed within a viewport field.
4. Set the properties for the viewport.
Note:  For complete descriptions of each field property, see Viewport Properties and Common Field Properties.
Viewport Properties
All the properties for viewports are described under Common Field Properties, with the exception of the following properties that are specific to the viewport field type:
ClipHeight
Specifies the height in pixels to which the image should be clipped
ClipWidth
Specifies the width in pixels to which the image should be clipped
ScrollBarWidth
(Read-only) Displays the width of the viewport's scroll bars
XOffset
Specifies the coordinate of the field in the viewport that appears at the left edge of the viewport. This property always has a non-negative value. Setting this property to 0 moves the viewport to the left edge of the viewed field.
YOffset
Specifies the coordinate of the field in a viewport that appears at the upper edge of the viewport. This property always has a non-negative value. Setting this property to 0 moves the viewport to the top edge of the field.
Last modified date: 12/20/2023