Module_WindowFields

Type: Module Parent Module: N/A

OMNIS 7 libraries that are converted to OMNIS Studio using the built-in converter display a different combination of foreground and background color in fields on window classes. This module can be used to set the back pattern, back color, fore color and border style properties of all window fields. You can change the pattern and color used to suit your requirements.

Functionality

Only process window objects. Reports are not processed.

Process each field object on the window in turn.

Fields of type kEntry,kListBox,kMultilineEntry,kComplexGrid,kScrollbox

These will be processed if any of the following apply:

  1. They have a backpattern property value = 0
  2. They have a backcolor property value = kColorWindowText
  3. They have a effect property value = kFlat

For fields that are processed:

  1. The backpattern property value is set to 1
  2. The backcolor property value is set to kColorWindow
  3. The effect property value is set to kInset

Fields of type kPushbutton

These will be processed if any of the following apply:

  1. They have a backpattern property value = 0
  2. They have a backcolor property value = kColorWindowText

For fields that are processed:

  1. The backpattern property value is set to 1
  2. The backcolor property value is set to kColor3DFace
  3. The forecolor property value is set to kGray

Fields of type kCheckbox

These will be processed if any of the following apply:

  1. The iconid property value is not 0 (zero)

For fields that are processed:

  1. The iconid property value is set to 0 (zero)

Fields of type kMaskedEntry

These will initially be processed as for entry fields above.

Further processing will be carried out if any of the following apply:

  1. They have a formatmode = kFormatNumber
  2. The data type of the variable displayed in the field is character.

For fields that are processed:

  1. The formatstring is set to an empty string.
  2. The formatmode is set to 21 (text format mode).
  3. The inputmask is set to an empty string.

Fields located inside scrollboxes

All fields located inside scrollboxes are moved up by 35 pixels to correct positioning error introduced by built-in converter.

A count of the number of objects fixed in each class is recorded in the log.

Assumptions

  1. None.

User Setup Required for this Module

  1. Please note that since not all libraries require this processing, some of the commands are commented out in the method "$processClass".
  2. If you wish to make use of all the potential functionality in this module then you will need to uncomment these lines.
  3. Prior to running this module, the you should review the default color, backpattern and border effect that will be set, and if these are not correct make any changes required to the code (see above).