Establishes the accelerators for the current window.
Syntax
WINDOW SET [ ADD|NOT] ACCELERATOR [ «keyname»]
Parameters
ADD | Specifies that keyname is to be added to the current list of accelerator keys. |
NOT | Specifies that keyname is to be removed from the current list of accelerator keys. |
keyname | Can be any of the 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), TABBACK (Shift-Tab), TABFORWARD (Tab) or any of the pre-defined mouse button names (used in ZIM Version 4 windows only): BUTTON1 through BUTTON6 If keyname is a character string that does not match any pre-defined key name, each character in the string becomes an accelerator key. |
Comments
Each window has its own current list of accelerator keys. Before a WINDOW SET ACCELERATOR command is issued, no accelerator keys are in effect.
Any combinations of key names can be specified as accelerator keys. Mouse button names are valid key names.
If neither ADD nor NOT is specified, then keyname replaces the current list of accelerator keys. If no keyname is specified, then all accelerator keys are disabled.
An accelerator key causes an event that is intercepted by the program. Event.EventType is assigned “Accelerator”, and Event.EventName is assigned the name of the key.
Accelerator keys are ignored if the focus is in a menu.
See Also
FORM INPUT
MENU INPUT
ThisWindow
WINDOW OPEN
Saves the current form or display in its current state for later use in the current Zim window.
Note: This command is invalid in Zim version 5 and above.
Syntax
FORM SAVE
Comments
This command should be used to preserve only dynamic changes to form field attributes (made using FORM SET(Attributes) commands) across FORM OPEN commands in the same window, when the current form or display in its current state is required at some later time.
Many forms and/or displays can be saved. When the FORM SAVE command is executed, the current form or display is pushed onto the stack of previously saved forms. Afterwards, no form or display is considered to be open in the window.
Saved forms or displays can be “popped” off the “stack” one at a time, using the FORM RESTORE command, to become the current form or display.
Note: The FORM SAVE command must only be used with forms that are selected in text windows – never forms in graphical windows. Use of this command in Zim for Windows can cause system termination.
Example
form open fEmployees
form set (protected) fEmployees.Salary %Salary protected from edit
form display input
… processing commands – error detected…
form save
form open fErrorMsg
form display noclear
… processing commands …
form open fEmployees NoClear % Salary is still protected
form display
When an input error occurs, the form is saved in its current state, then an error message is displayed over the form on the screen. The form is later restored and displayed as it existed at the time of the FORM SAVE.
See Also
FORM CLEAR
FORM DISPLAY
FORM INPUT
FORM OPEN
FORM REPORT
FORM RESTORE
FORM SCROLL
FORM SET
Establishes a scrolling association between a form and a result set.
Syntax
FORM SET SCROLL [ NOCLEAR] form FROM set [LET clause] [EVALUATE clause]
Parameters
NOCLEAR | Specifies that form is not to be immediately initialized with data from set. |
form | The form through which records are to be scrolled. Form must be open in the current window; it can be a multi-instance form in a display object. |
set | A result set whose records are to be scrolled through form. |
Comments
The current member of set is placed in the first instance of form. Subsequent members of set are placed in subsequent instances of form (if any).
Although many scrolling relationships can exist at one time, one set cannot have a scrolling relationship with more than one form at a time.
The application user scrolls the form through the records in set by moving the focus to the form and pressing a SCROLL key. If the focus is not located in an active scrolling form, but active scrolling forms exist in the display, then pressing a SCROLL key causes all active scrolling forms to scroll over their associated sets.
Example
To establish a scrolling relationship between the fEmps form and the result set EmpSet, enter
find all Employees where Location="New York" sorted by Name -> EmpSet
form open dEmps
form set scroll fEmps from EmpSet
See Also
FORM SCROLL
FORM SET
Controls the display of windows on the screen.
Syntax
WINDOW DISPLAY [window] [EXPOSE|HIDE]
Parameters
window | Window can be name The name of an open window. The software looks up the value of 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. |
EXPOSE | Specifies that the window is to be displayed over any other active windows already on the screen. This is the default. |
HIDE | Specifies that the window is to be displayed beneath any other active windows already on the screen. |
Comments
The WINDOW DISPLAY command enables an application program to lift a particular window atop other active windows (using EXPOSE) or to drop the window below all other active windows (using HIDE).
An application user can also lift a window by interacting with it.
Example
To display the window wHelp underneath the other active windows:
window display wHelp hide
See Also
ThisWindow
WINDOW ACTIVATE
WINDOW CLEAR
WINDOW CLOSE
WINDOW DEACTIVATE
WINDOW MOVE
WINDOW OPEN
WINDOW SCROLL
WINDOW SET
WINDOW SIZE
Invokes Zim IDE to edit a form.
Syntax
FORM DEFINE formname [[IN] dirname]
Parameters
formname | The name of a new or existing form. |
dirname | The name of the application directory in which the specified form can exist. If the form does not exist in the provided application directory, it will be created there. If omitted: the form will be selected from the first application directory in which it exists. if the form does not exist, it will be created in the ZIM application directory. |
Examples
Invokes Zim IDE to edit the form fAddEmps:
form define fAddEmps
If fAddEmps does not exist in any application directory, it will be created in the ZIM application directory.
Otherwise, it will be selected from the first application directory in which it exists.
form define fAddEmps ZIM
If fAddEmps does not exist in the ZIM application directory, it will be created there.
It will be selected from the ZIM application directory only if it exists there.
form define fAddEmps EMPS
If fAddEmps does not exist in the EMPS application directory, it will be created there.
It will be selected from the EMPS application directory only if it exists there.
Related topics
DISPLAY DEFINE
MENU DEFINE
WINDOW DEFINE
Invokes Zim IDE to edit a menu.
Syntax
MENU DEFINE menuname [[IN] dirname]
Parameters
menuname | The name of a new or existing menu. |
dirname | The name of the application directory in which the specified menu can exist. If the menu does not exist in the provided application directory, it will be created there. If omitted: the menu will be selected from the first application directory in which it exists. if the menu does not exist, it will be created in the ZIM application directory. |
Examples
Invokes Zim IDE to edit the menu mAddEmps:
menu define mAddEmps
If mAddEmps does not exist in any application directory, it will be created in the ZIM application directory.
Otherwise, it will be selected from the first application directory in which it exists.
menu define mAddEmps ZIM
If mAddEmps does not exist in the ZIM application directory, it will be created there.
It will be selected from the ZIM application directory only if it exists there.
menu define mAddEmps EMPS
If mAddEmps does not exist in the EMPS application directory, it will be created there.
It will be selected from the EMPS application directory only if it exists there.
Related topics
DISPLAY DEFINE
FORM DEFINE
WINDOW DEFINE
Invokes Zim IDE to edit a window.
Syntax
WINDOW DEFINE winname [[IN] dirname]
Parameters
winname | The name of a new or existing window. |
dirname | The name of the application directory in which the specified window can exist. If the window does not exist in the provided application directory, it will be created there. If omitted: the window will be selected from the first application directory in which it exists. if the window does not exist, it will be created in the ZIM application directory. |
Examples
Invokes Zim IDE to edit the window wAddEmps:
window define wAddEmps
If wAddEmps does not exist in any application directory, it will be created in the ZIM application directory.
Otherwise, it will be selected from the first application directory in which it exists.
window define wAddEmps ZIM
If wAddEmps does not exist in the ZIM application directory, it will be created there.
It will be selected from the ZIM application directory only if it exists there.
window define wAddEmps EMPS
If wAddEmps does not exist in the EMPS application directory, it will be created there.
It will be selected from the EMPS application directory only if it exists there.
Related topics
DISPLAY DEFINE
FORM DEFINE
MENU DEFINE
Invokes Zim IDE to edit a display.
Syntax
DISPLAY DEFINE displayname [[IN] dirname]
Parameters
displayname | The name of a new or existing display. |
dirname | The name of the application directory in which the specified display can exist. If the display does not exist in the provided application directory, it will be created there. If omitted: the display will be selected from the first application directory in which it exists. if the display does not exist, it will be created in the ZIM application directory. |
Examples
Invokes Zim IDE to edit the display dAppEmps:
display define dAppEmps
If dAppEmps does not exist in any application directory, it will be created in the ZIM application directory.
Otherwise, it will be selected from the first application directory in which it exists.
display define dAppEmps ZIM
If dAppEmps does not exist in the ZIM application directory, it will be created there.
It will be selected from the ZIM application directory only if it exists there.
display define dAppEmps EMPS
If dAppEmps does not exist in the EMPS application directory, it will be created there.
It will be selected from the EMPS application directory only if it exists there.
Related topics
FORM DEFINE
MENU DEFINE
WINDOW DEFINE
Moves a window to a new location on the screen.
Syntax
WINDOW MOVE [window] TO position [EXPOSE|HIDE]
Parameters
window | 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. |
position | Position specifies the new location of the upper edge and left-hand edge of the window, and also changes the values for the system variables ThisWindow.WindowRow and ThisWindow.WindowCol. A window’s position is always relative to its physical parent. The physical parent of a clipped window is another window (parentwin). The physical parent of a pop-up window is the terminal. If position is such that the window moves out of bounds, it is automatically adjusted so that the window remains entirely within the parent’s boundaries. |
EXPOSE | (DEFAULT) Specifies that the window is to be displayed over any other active windows already on the screen. |
HIDE | Specifies that the window is to be displayed beneath any other active windows already on the screen. |
Comments
The WINDOW MOVE command enables an application program to establish a new location for an open window.
If the specified window is active, it is displayed in its new position. If the window is open but not active, the WINDOW MOVE command establishes the position at which the window is to appear when activated.
Example
To move the window wStateCodes to a specified location, enter the following command:
window move wStateCodes to 200 400
See Also
ThisWindow
WINDOW ACTIVATE
WINDOW CLEAR
WINDOW CLOSE
WINDOW DEACTIVATE
WINDOW DISPLAY
WINDOW OPEN
WINDOW SCROLL
WINDOW SET
WINDOW SIZE
Makes an open window available for viewing and interaction by the application user.
Syntax
WINDOW ACTIVATE [window] [EXPOSE|HIDE]
Parameters
window | 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. |
EXPOSE | (DEFAULT) Specifies that the window is to be displayed over any other active windows already on the screen. |
HIDE | Specifies that the window is to be displayed beneath any other active windows already on the screen. |
Comments
WINDOW ACTIVATE makes an open window visible on the terminal screen so that the application user can interact with the window. Note, however, that an input request relating to an inactive window (from a FORM INPUT, INPUT, or MENU INPUT command) automatically activates that window.
WINDOW ACTIVATE does not make the specified window the current window. If the specified window is already the current window, it remains the current window.
Separating the opening of a window (WINDOW OPEN) from the presentation of a window to the application user (WINDOW ACTIVATE) enables you to prepare the window and its contents before making the window visible. Similarly, you can keep a window open for long periods of time, activating it only when needed.
Example
window open wContracts
menu open mContracts
menu display
form open fContracts
form display
window activate
Opens a window, and then opens and displays a menu and form in the window. Once the window is initialized, the WINDOW ACTIVATE command presents it to the application user.
window open wTrace
…other commands…
window activate wTrace
…other commands…
window deactivate wTrace
Activates a trace window when it is required.
See Also
$iswinopen
ThisWindow
WINDOW CLEAR
WINDOW DEACTIVATE
WINDOW DISPLAY
WINDOW MOVE
WINDOW SCROLL
WINDOW SET
WINDOW SIZE