The only difference in defining a virtual menu form is the menu definition function. To define a virtual menu form, use the virtual menu definition function, mn_vdef():
|
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
All arguments are the same as mn_def() except the final two, vm_rowq and vm_colq. With these two arguments you specify the size of the underlying buffer for placing menu fields. You can specify AUTOSIZE for either of these arguments, in which case, the system will create a virtual menu that is large enough to include all the text and background fields defined for the form.
The arguments rb, cb, rowq, colq, att, and bdrp define the window that the virtual menu is displayed in. You should take care when defining the size of the display window since the user may not be able to see all the menu fields within the window. We recommend that the window be at least the size of the largest menu field (and associated background text, if any).
You can specify AUTOSIZE for rowq or colq. If you specify AUTOSIZE for the menu window, the system automatically sizes the menu to the smallest size that will accomodate all fields and background items on the menu.
Defining the menu fields is accomplished the same way as regular menus, with mnf_def(). Note that when defining menu fields for a virtual form, the coordinates you use for placing the fields in the menu are based on the virtual menu, not the menu window.
For example, the following code defines a vertical, scrollable menu form. The menu form window is 4 rows but the underlying menu is 7 rows.
|
When the menu form is displayed and processed, the user will see only four fields in the menu at a time. As the user moves the highlight bar through the menu fields, the system updates the display so that the currently highlighted menu field is always within the window.
Defining Automatically Sized and Placed Virtual Sub-Menus