Shifts the focus to the open menu in the current window and puts the application user in control of the interface.
Syntax
MENU INPUT [PURGE]
Parameters
PURGE
Specifies that unprocessed input received before the MENU INPUT command was executed is to be ignored. Eliminates the possible effects of inadvertent keystrokes or mouse actions before the application user is actually placed in control of the interface. PURGE is often used when the application user is required to confirm some action.
Comments
If the open menu is a pop-up menu that has not yet been displayed, MENU INPUT automatically displays the menu before requesting input.
The input focus remains within the menu until a selection is made or the menu is cancelled. Accelerator keys are ignored while the menu has focus. When the input request ends, the system variable ThisMenu returns information about the selected item.
Shifts the focus to the open form in the current window and puts the application user in control of the interface.
Syntax
FORM INPUT [PURGE]
Parameters
PURGE
Causes unprocessed input, received before the FORM INPUT command was executed, to be ignored. Eliminates the possible affects of inadvertent keystrokes or mouse actions before the application user is actually placed in control of the interface.
Comments
The FORM INPUT command ensures that the focus is in an available field of the current form and requests input from the application user. The application user can navigate through the available objects, enter data, interact with objects, and so on. If a scrolling relationship has been established between the form and a set of records, designated scrolling keys can be used to scroll data through the form. The FORM INPUT command completes when an event occurs that causes a callback to the application program. If, at completion, the field that has focus contains an invalid value, the value in that field is automatically deleted. A FORM DISPLAY command with the INPUT option or a MENU INPUT command also requests input from the application user. The completion of FORM INPUT changes the value of the Event, ThisForm, ThisMenu, and ThisWindow system variables.
Form The name of a currently open form or display, all of whose fields are to be reset. Specify a particular instance of a form in brackets beside the object’s name. formfield The name of a particular field that is to be reset in a currently open form or display. Specify a particular instance of a form field in brackets beside the form field’s name. ([exp1 ],[exp2 ],[exp3 ]) Positive integers or expressions that evaluate to positive integers, that identify a particular form or form field to be cleared. Exp1 identifies the form number; exp2, the field number; exp3, the instance of the form or form field in the display. At a minimum, either exp1 or exp2 must be specified.
Example
add Customers from fCustomer
form clear fCustomer
Resets the values of all form fields in the fCustomer form to their default values after saving their current contents in an EntitySet called Customers.
form clear fMyForm[5]
form clear (2,,5)
The preceding two commands both reset the values of all form fields in the fifth instance of form number 2, called fMyForm.
form clear fMyForm.LastName
Resets all instances of a certain form field in a form.
Object can be name The name of the menu to be opened. (expr ) A character string, or an expression that evaluates to a character string, to be used at run time as the name of the menu. Using expr enables one MENU OPEN command to specify different menus, at the risk of encountering an ambiguous name. MENU OPEN (expr) cannot be used to open menus defined in a foreign directory.
NOCLEAR
Specifies that the values currently assigned to the menu items are to be retained. (If NOCLEAR is not specified, each field is set to its default value when the menu is opened.)
Comments
Each open window that is not clipped can have a menu. The menu remains open as the current menu in its window until a MENU OPEN, MENU CLOSE, or WINDOW CLOSE command is executed for the window.
MENU OPEN does not display the menu or request input from the user; it initializes the menu for use. The menu is displayed using the MENU DISPLAY command and input is requested using the MENU INPUT or FORM INPUT command (if a form is open in the window).
Pre-defined menu attributes can be changed dynamically using the MENU SET (Attributes) command.
Can be menu The name of a currently open menu, all of whose items are to be cleared. menuitem The name of a particular menu item to be cleared. ([exp1 ],[exp2 ],[exp3 ]) Positive integers or expressions that evaluate to positive integers, that identify a particular menu or menu item. Exp1 identifies the menu number; exp2, the item number. (Exp3 is reserved for future use.) Exp1, exp2, and exp3 must be positive integers or expressions that evaluate to positive integers. At least one of exp1 or exp2 must be specified.
Comments
MENU CLEAR resets each of the specified items within the open menu in the current window to their default values, as specified when the objects were defined in the Object Dictionary. The menu or menu items do not change in appearance until redisplayed using a MENU DISPLAY command.
If an item in the menu is currently in an invalid state owing to application user input, the MENU CLEAR command that applies to that item clears the invalid state.
Note that when a menu is opened (by a MENU OPEN command), all menu items are set to their default values.
Example
To reset all items in Menu1 to their default values, enter
Sets the location of the text cursor in the current window. Determines whether the cursor can move outside unprotected fields in the current window.
Syntax
WINDOW SET CURSOR option
Parameters
option
Option can be row col Where row and col are integers or expressions that evaluate to integers. Row identifies the character row in which the text cursor is to be positioned; col identifies the character column in which the text cursor is to be positioned. Valid values are 1 through the maximum number of rows or columns within the current window’s logical dimensions. Complex expressions must be enclosed in parentheses. PROTECTED Specifies that the text cursor must always be associated with an object in the window. UNPROTECTED Specifies that the text cursor can move anywhere within the window’s presentation space. Applies to Zim Version 4 windows only.
Comments
To position the focus on an object in a window based on its location, you can use WINDOW SET CURSOR rowcol. The common means of placing the focus is FORM SET FOCUS where the object is identified explicitly.
Window can be name The name of an open window. The software looks up name in the currently accessed directories in the usual way. A compiled command using name contains the unambiguous name of the window (including a reference to an application directory) that was found at compile time. (expr ) A character string, or an expression that evaluates to a character string, that is to be used at run time as a window object name. The parentheses must be entered. A compiled command using (expr) can refer to many windows, at the risk of encountering an ambiguous window name (i.e., no directory specified when versions of the window are available in two or more directories). If neither name nor (expr) is specified, the current window is assumed.
Comments
The WINDOW CLOSE command closes the specified window (and any form, display, or menu that is currently open in the window). If the window being closed is active, it is deactivated (removed from the screen) before being closed.
If the window being closed is the current window, the window that last was current becomes current once again.
If the window being closed is the parent of other open windows, the child windows are also closed.
Modifies the individual attributes of particular menus or menu items.
Syntax
MENU SET («option») «object»
Parameters
option
Can be [UN]AVAILABLE, [NOT] CHECKED, [IN]VISIBLE, LABEL, [NOT] SUPPRESS, RESET The above options affect only the indicated attribute; all other attributes are left unchanged.
object
Object can be menu The name of the open menu in the current window. menuitem The name of a particular menu item within the open menu. ([exp1 ],[exp2 ],[exp3 ]) Positive integers or expressions that evaluate to positive integers, that identify a particular menu or menu item. Exp1 identifies the menu number; exp2, the item number. (Exp3 is reserved for future use.) Exp1, exp2, and exp3 must be positive integers or expressions that evaluate to positive integers. At least one of exp1 or exp2 must be specified.
Example
To set the attributes of individual menus or menu items, enter
Window can be name The name of an open window. The software looks up name in the currently accessed directories in the usual way. A compiled command using name contains the unambiguous name of the window (including a reference to an application directory) that was found at compile time. (expr ) A character string, or an expression that evaluates to a character string, that is to be used at run time as a window object name. The parentheses must be entered. A compiled command using (expr) can refer to many windows, at the risk of encountering an ambiguous window name (i.e., no directory specified when versions of the window are available in two or more directories). If neither name nor (expr) is specified, the current window is assumed.
Comments
The WINDOW CLEAR command erases the contents of a window. The client area of a window appears blank. For text windows, the window is cleared by overwriting the client area with the specified fill character. The “window dressing” (border, buttons, etc.), and menu (if any) are not affected. Any form open in the window remains open, but ceases to be displayed.
Can be UP, DOWN, LEFT, RIGHT, PAGEUP, PAGEDOWN, HOME, END, JUMPUP, JUMPDOWN, JUMPLEFT, JUMPRIGHT
keyname
Can be any of the following pre-defined key names: F1 through F100, ESCAPE, RETURN, ENTER, UP, DOWN, LEFT, RIGHT, PAGEUP, PAGEDOWN, HOME, END, JUMPUP (Ctrl-Up), JUMPDOWN (Ctrl-Dn), JUMPLEFT (Ctrl-Lf), JUMPRIGHT (Ctrl-Rt), TABFORWARD (Tab), TABBACK (Shift-Tab) If keyname is a character string other than a pre-defined key name, each character in the string becomes a scroll key. Any combination of keys can be specified in a single command.
Comments
A scrolling key can potentially also be defined as an accelerator key (using the WINDOW SET ACCELERATOR command).
Until you execute a WINDOW SET SCROLL command, no scrolling keys are in effect for the given window.
Once you execute a WINDOW SET SCROLL command that names keys, those keys remain in effect as scrolling keys, with their assigned scrolling actions, until changed or disabled by another WINDOW SET SCROLL command.
A WINDOW SET SCROLL command that names no actions or keys disables all existing scrolling keys for the current window.