The number of rows and columns that the virtual menu scrolls within the menu window as the user moves from field to field is controlled by two menu structure members: horizontal scrolling quantity and vertical scrolling quantity. No matter what the value of the scrolling quantity, if the next field is already displayed within the window, the menu is not adjusted.
By default, both the horizontal and vertical scrolling quantities are MINIMUM. This means that the virtual form scrolls the least amount possible to display the next field in the window. This means:
You can specify that you want the field to always appear left- or right-justified, in the center of the window, or at the top or bottom of the window.
Designer: You can change the virtual form scrolling quantities within the Designer. See the Designer User's Guide for more information. You can also change the scrolling quantities in your code, at any point after you have read the form from the Designer library.
Code: To change the virtual scrolling quantities in your code, call sfm_vadjq()
|
||
|
|
|
|
|
|
|
|
|
The arguments horzq and vertq can one of the values listed in Table 20.1.
Table 20.1: Horizontal and Vertical Scrolling Quantities for Virtual Forms
| Scrolling Quantity | Explanation |
| horzq | |
| MINIMUM | Moves the minimum amount in the horizontal direction. |
| RTJUST | Always right justifies the current field in the window. |
| LFTJUST | Always left justifies the current field in the window. |
| CENTERFLD | Always centers the item horizontally within the form window. |
| vertq | |
| MINIMUM | Moves the minimum amount in the vertical direction. |
| PAGE | Moves one page up or one page down when scrolling vertically. |
General: Instead of using one of the predefined values, you can set the field scrolling quantity to a specific value. When the window needs to be adjusted to show the current field, the window is scrolled the horizontal and vertical field scrolling quantities specified.
Caution: When you specify a scrolling quantity as a specific value, make sure that you specify scrolling quantities that are appropriate for your menu or the user interface will behave unpredictably. You should never specify a vertical scrolling quantity larger than the number of rows in the form window nor a horizontal scrolling quantity larger than the number of columns in the form window. If you do, the virtual scrolling quantity is disregarded, and Vermont Views will scroll the menu by the number of lines in the window.