ContentsIndexPreviousNext

MOUSE*

This variable has meaning only on systems with a mouse. When the user selects a field in the Screen Section, the exact behavior depends on the field's underlying type. The runtime distinguishes between three classes of fields: numeric, numeric-edited, and all others. These are referred to respectively as NUMERIC, EDITED, and ALPHA.

You can control the behavior of the mouse with regard to each of these field types with the MOUSE variable. This variable takes as its arguments one of the field-type names and two keywords . The first keyword defines how the field is selected when the user presses the left button. The second keyword indicates the shape that the mouse pointer should take while in the field. The first keyword can be one of the following:

None - Indicates that this type of field may not be selected with the mouse. When this keyword is used, then the second keyword (which defines the mouse's shape) is ignored. The mouse adopts the shape used for areas of the screen that are not part of any field.

Field - Indicates that pressing the left button anywhere in the field causes the cursor to be positioned at the beginning of the field.

Character - Indicates that pressing the left button in the field positions the cursor at the character pointed to by the mouse. If this is past the last non-prompt character in the field, the cursor is placed just after the last non-prompt character

The second keyword indicates the shape that the mouse pointer should take while in the field. It can be one of the following:

Arrow - The mouse pointer appears in the default arrow shape.

Bar - The mouse appears as a vertical bar. This is the "I-Bar" shape typically used to indicate that the mouse can be positioned at a particular character.

Cross - The mouse appears as cross-hairs.

You may also define the shape that the mouse takes when it is used in the
current field. Because the action of the mouse is the same for all field types once they become the current field, the mouse shape is the same for all three types. You set the desired shape using the Current keyword in the MOUSE variable. The default shape is the Bar shape.


Note that depending on where you are setting the MOUSE variable, there are three methods of setting its configuration.
If you want to implement this variable in a configuration file, the variable can be set without using the equal sign. For example:

MOUSE_NUMERIC_SHAPE     Bar

If you are setting the variable as part of your environment in DOS or Windows, the variable would look like this:

SET MOUSE_NUMERIC_SHAPE=Bar

If you are setting the variable in your program using COBOL syntax, the variable would look like this:

SET ENVIRONMENT "MOUSE_NUMERIC_SHAPE" TO "Bar"

The default configuration is as follows:

MOUSE_ALPHA_CHARACTER Bar
MOUSE_NUMERIC_FIELD Arrow
MOUSE_EDITED_FIELD Arrow
MOUSE_CURRENT Bar


Note that you may place multiple entries on the MOUSE configuration line, but you are not required to do so.
The following configuration variables can also be used to set the behavior of the mouse:

To set field selection: To set cursor shape:
MOUSE_ALPHA_SELECT MOUSE_ALPHA_SHAPE
MOUSE_EDITED_SELECT MOUSE_EDITED_SHAPE
MOUSE_NUMERIC_SELECT MOUSE_NUMERIC_SHAPE
MOUSE_CURRENT_SHAPE

With these variables, you need to set the first and second keywords separately. For example, to change the defaults shown above for a numeric field, you would enter:

MOUSE_NUMERIC_SELECT  character
MOUSE_NUMERIC_SHAPE  bar